Dog rescued in SF Bay miles from shore