Added documentation for HostingServiceHook

This change adds documentation and sample code for the newly created
HostingServiceHook.

Reviewed at https://reviews.reviewboard.org/r/6600/
Fix some trailing whitespace.
Merge branch 'release-2.0.x'