Density-functional study on the structural and magnetic properties of N-doped graphene oxide