It's well-known dogs can sense human emotions, but how do they do it? And what are the implications for how we behave around them?