THE KINEMATICS AND PHYSICAL CONDITIONS OF THE IONIZED GAS IN MARKARIAN 509. I. CHANDRA HIGH ENERGY GRATING SPECTROSCOPY