Unbiasing Hamiltonian Monte Carlo algorithms for a general Hamiltonian function