Atomic origin of magnetic coupling of antiphase boundaries in magnetite thin films