The Hahn-Exton q-Bessel function as the characteristic function of a Jacobi matrix