Temperature and density dependent cooling function for H2 with updated H2/H collisional rates