San Francisco's favorite dog breed is a pop-culture icon that once caused a stray-pup crisis.