Dogs go through a midlife crisis just like humans, study finds