Quantum group and magnetic translations Bethe ansatz for the Asbel-Hofstadter problem