From the ideal gas to an ideal glass: reversible path to random close packing