On the absolute age of the metal-rich globular M71 (NGC 6838). I. Optical photometry