Ancestors of dogs living in North America 40 million years ago resembled small mongooses (stock image) and like cats, were ambush predators