Canonical Hamiltonian mechanics of Hall magnetohydrodynamics and its limit to ideal magnetohydrodynamics