Traits such as face shape, size and sex help predict a dog breed’s life span