The "boy and his dog" tale is a piece of prehistoric fiction, but scientists are uncovering the true origins of our incredible relationship with dogs