Rockies end 10-game skid vs Giants with 10-9 win