Quantum critical points via gravity