Photoionization and heating of a supernova-driven turbulent interstellar medium