Time history of the Martian dynamo from crater magnetic field analysis