Scientists have found that the brains of humans and dogs are in sync when they gaze at each other.