Asynchronous execution of hooks

Hooks could potentially be long-running. Previously, hooks
were run sequentially, meaning the hook must complete
before the original event can show as completed. That means
that e.g. the delete-node command would not finish/return
until all hooks for that event have completed.

Hooks will be executed sequentially on their own singleton
queue, and arguments (node, hook config, policy) will be
cached and then reloaded if necessary prior to running the
hook.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-370
Spec tests for `razor events`

This adds tests for the `razor events` query.

For https://tickets.puppetlabs.com/browse/RAZOR-382
Better error on bad format for events

When a request like `/api/collections/events/foo` came in,
this request did not result in a proper error message.

For https://tickets.puppetlabs.com/browse/RAZOR-382
Limit results from `razor events`

The list of events in `razor events` can grow unwieldy very quickly. This
change instates a default of all rows returned with options to return
different rows using parameters /api/collections/events:
- `limit` determines the maximum number of rows to return,
which defaults to all events.
- `start` determines what row number to start with, which defaults to 0.

This includes both of these parameters in `/api` under
`collections => events => params`.

Additionally, the collection will return an element `total`, which
tells the total number of rows that would have been returned without
the `limit` parameter supplied.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-382
Limit events returned from `/api/collections/nodes/:name/log`

In addition to `/api/collections/events`, the view for the node's
log also needs to be filtered. This will allow the same parameters
('limit' and 'start') to be passed in order to filter the returned
collection.

The result from `/api/collections/nodes/:name` will have a key
for `params` which will indicate that `limit` and `start` are
both valid for the `log` collection.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-368
Refactoring to generalize collection_view

Non-functional change making a helper method more
generic.

For https://tickets.puppetlabs.com/browse/RAZOR-382
Limit events returned from `/api/collections/hooks/:name/log`

Fixes https://tickets.puppetlabs.com/browse/RAZOR-368
Add explicit ordering to `/api/collections/nodes`

The previous query used implicit (non-reliable) ordering.
This will instead use 'name' so the result can be
deterministic.

For https://tickets.puppetlabs.com/browse/RAZOR-382
Limit nodes returned from `/api/collections/nodes`

Fixes https://tickets.puppetlabs.com/browse/RAZOR-368
Fix improper abbreviation

The call to the 'node-registered' hook contained an incorrect
assumption that `Razor::Data::Hook` would be aliased to just
`Hook`. This passed in the spec tests, but failed otherwise
yielding an error: "NameError - uninitialized constant
Razor::Command::RegisterNode::Hook". This fully qualifies
that.

For https://tickets.puppetlabs.com/browse/RAZOR-371