The Hubble Space Telescope Medium Deep Survey with the Wide Field and Planetary Camera. 1: Methodology and results on the field near 3C 273