Freiman's theorem in an arbitrary abelian group