Adsorption of molecular oxygen on doped graphene: atomic, electronic and magnetic properties