how dogs became man’s best friend