Resolved-sideband cooling and position measurement of a micromechanical oscillator close to the Heisenberg uncertainty limit