First-principles study of magnetism in spinel MnO2