Efficient gravitational wave searches with pulsar timing arrays using Hamiltonian Monte Carlo