Create Siren view helpers

Razor::View::Siren provides reusable functions for generating Siren
(https://github.com/kevinswiber/siren) representations of objects. The goal
is not to provide direct serialization of database objects as Siren, but to
provide a means by which certain object properties, explicitly specified, are
exposed to the API client.
Migrate API collection output to Siren

JSON Siren (https://github.com/kevinswiber/siren) is a hypermedia specification
for definiting entities in JSON. Siren provides a standard way of representing
both objects and collections alongside their associated actions. It is
essentially an extension and formalization of the current API object format, in
that it supports top-level objects and collections, and both embedding and
linking of objects while specifying the appropriate relation. Siren uses
a 'class' array in place of the current 'spec' property, which allows for
classifying something like a list with both the 'collection' class and the
class of the contained objects.

This patch replaces all objects returned by API calls with their JSON Siren
equivalents, and modifies the CLI client to accept and print Siren entities.

Note: THIS BREAKS THE CLI CLIENT ACTION/COMMAND FUNCTIONALITY. This will be
fixed with a future commit.
Define API endpoints with metaprogramming

This replaces the previous `command :create_xxx` helper with several other
helpers for defining RESTful endpoints. The new helpers are meant to remove
the common CRUD operation and error handling code from individual routes, and
consolidate it in one place.

In terms of concrete advantages, these new handlers allow interpolation of data
from defined routes to be included in the output of other routes. A good
example is the inclusion of Siren "action" listings -- PUT, POST, and DELETE
endpoints -- with the objects they act upon. This functionality will be added
in the next commit.

For backwards compatibility, the helpers create two endpoints for each action:
a /api/commands/{create|delete}-{image|tag|broker|etc.} endpoint, and a
/api/collections/{installers|images|tags|etc.} endpoint. The former is for
backwards compatibility and will eventually be removed, while the latter is
more forward-looking and RESTful (using URLs for resources, not actions).
Replace '-' with '_' in POST input recursively
Add fields to collection actions

Advertising the expected fields with their actions allows clients to send the
expected parameters, instead of blindly guessing from the error messages. The
fields are admittedly a little less than helpful in that they can only list
HTML <input> element types; it might be worth extending the Siren spec with a
"schema" property to provide the client with more information about expected
types, like JSON objects, which aren't supported explicitly by HTML.
Merge with Define with metaprogramming
Parse API output into Siren structures

Parsing the output of the API as into defined Siren objects prevents the need
for ad-hoc duck-typing ("has 'properties' field" => it's an entity; "has
'fields' field" => is an action) and further defines the available keys and
properties for each type of object.
Merge with "Add fields"
Merge with Siren API parsers
Support non-JSON fields for policy creation

Since there is no indication in the returned "actions"->"fields" that a field
is expected to be valid JSON, it is nice to provide alternative, simple-valued
fields that will accept strings instead of JSON objects. The JSON object fields
are maintained for compatibility.
Add action navigation to CLI

This allows treating a Razor::CLI::Siren::Action object as a valid navigation
destination. The point is to enable actions to have help messages and such
outside of their container entity. This is a shift from "action as a part of an
entity" to "action bundled with an entity to provide context".
Use OptionParser for CLI help and command parsing

Instead of trying to reinvent the wheel for command-line option parsing, it
makes a lot more sense to use Ruby's built-in OptionParser. Since all the
expected field names are given to us, they can be used to generate command-
line switches for OptionParser, which in turn provides nicely-formatted help
text, and detects unexpected options.
Whitespace changes