Comparative Study of Electron Energy Deposition and Yields in Water in the Liquid and Vapor Phases