Monte Carlo Simulation of Range and Energy Deposition by Electrons in Gaseous and Liquid Water