Why the relationship between people and dogs runs so deep — its psychology and history, the grief when it ends, and how a changing world keeps reshaping it.