AREPO: Cosmological magnetohydrodynamical moving-mesh simulation code