A long-lived lunar dynamo powered by core crystallization