Encode URI component in ServiceHooks.subscribe_service_hook

Ports fix from @oliamb in #274 to new file in 2.x.