Up until the 17th century, people thought dogs were little more than unemotional machines that could not feel pain, either emotional or physical.