Tokamap: A Hamiltonian twist map for magnetic field lines in a toroidal geometry