A note on the foundation of relativistic mechanics. II: Covariant hamiltonian general relativity