Add webhook support

Initial support for webhooks.  Implementation is built to support additional events and event handlers in future.  Currently only one event is being raised - a DocumentCommitEvent, after a doc is successfully updated in updateDoc.

EventManager maintains a channel (eventChannel) for raised events.  The only synchronous activity on the main document update go routine is to add the event to the EventManager channel.

EventManager has a go routine that works the eventChannel.  For each event, it passes the event to each registered eventHandler.  Each eventHandler creates a go routine for their own processing (for webhook, it's making an HTTP POST).

eventHandlers are defined in config.  Currently the only supported eventHandler type is webhook.
Manage the number of concurrent goroutines used for event processing

Adds the ability to throttle the number of concurrent goroutines used for event processing, to avoid excessive CPU usage.  Number of concurrent goroutines is limited to 'max_processes' config setting (defaults to 500).  Pending event queue is sized at 3*max_processes, to handle temporary inflow spikes.  When pending event queue is full, blocks with a timeout of 'wait_for_process' ms (defaults to 5 ms).

Minor fixes also included:
- fixed naming for event_handlers in config
- added timeout setting for webhook handler.  Defaults to 60s
Merge branch 'feature/issue_482_rebased' of https://github.com/couchbase/sync_gateway into feature/issue_482_rebased
Switch full event queue handling to drop incoming instead of oldest

Event queue was dropping the oldest in the queue when the queue was full - changed to instead block incoming when queue full. Changed the raiseEvent method to return err on full queue, to allow consumers to handle if appropriate.  Currently not used for document change event - expected as future handling for failed events.

Also includes a couple of minor code tweaks based on review, and some refactoring for code readability.