Non-Equilibrium Chemistry And Cooling In Simulations Of Galaxy Formation