Shamrock Rovers moved six points clear at the top of the SSE Airtricity League and made it seven wins from seven with a comeback win over Derry City.