Axisymmetric force-free magnetosphere of a pulsar – I. The structure close to the magnetic axis