Add WebAPICapabilitiesHook, for adding capability listings to the API.

This introduces a new WebAPICapabilitiesHook that extensions can use to
register a set of custom web API capabilites, displaying in /api/ or
/api/info/.

This hook handles registering and unregistering the sets of web API
capabilities. Documentation and sample code was added, detailing the use
of the hook.

Reviewed at https://reviews.reviewboard.org/r/6613/