Man’s best friend was domesticated not once, but twice: Study