Add yardoc support, using GitHub Format Markdown

This adds yardoc support to the gemfile, in a group, and configuration to make
it default to GitHub Format Markdown -- for compatibility with the most common
place for our output to be rendered and read.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Add the `constraints_validation` plugin to Razor

This is a Sequel plugin that automates some of the integration between
database and Ruby level constraints: specifically, it defines a DSL for use in
migrations that adds constraints to tables, and couples that with storing
sufficient metadata to build matching Ruby constraints at runtime.

This gives the nicer error handling of "catch early, in Ruby" without the
penalty of hand-writing duplicate tests in both the DDL and Ruby.

It also ensures that the database remains authoritative about constraints:
because all the constraints are expressed as real DML constraints, we avoid
the risk that a mistimed application of psql corrupts data.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Rewrite basic schema creation to use `constraints_validation`

This implements the changes required to use new plugin:

 * split the change block into an explicit up and down block
 * use a validate block on table creation to add constraints
 * use drop_constraint_validations_for to on table destroy

The net effect is little visible change in the effort to build the migration,
but an overall improvement in error reporting on constraint failures:

    type is not in range or set: ["mk", "os", "esxi"]

...as opposed to the PostgreSQL level exception reflecting the same.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Defer loading of constraint_validations plugin to just before loading models

Loading the validations plugins from the initializer causes a
chicken-and-egg problem in that the initializer is loaded as part of the
Rake task to set up the DB schema; the plugin requires the
sequel_constraint_validations table to exist, but since we haven't loaded
the schema yet, it does not.
* spec/spec_helper.rb: default RACK_ENV to test

This is important for running tests directly via rspec; without this, tests
run via rspec run against the development environment.
Merge pull request #3 from lutter/dev/validations

Dev/validations
Validate the JSON columns in Node as a Hash/Array rather than a String
* db/migrate/001_create_base_schema.rb: remove models table

We won't need that.
Remove all traces of an active_model; we don't need that
* spec/spec_helper.rb: conveniences for dealing with model objects
Binding of policy to nodes
Basic functionality for data-driven installers
Associate an installer with a policy by name
* lib/razor/data/node.rb: maintain a log for each node
Node: maintain a boot count, which is reset every time a new policy is bound
Support for interpolating installer templates, including boot templates

This adds routes for fetching templated files directly, and for getting the
next (ipxe) file to boot with
Remove notion of policy templates - these are now installers
Support storing an IPAddress that the node sends us
* db/migrate/002_create_base_schema.rb (nodes.hw_id): change unique constraint

The hw_id must be case-insensitively unique
Razor::Config: remove unneeded class level accessors

The right way to access config settings is Razor.config[key]

Instead of Razor::Config.config, write Razor.config
Instead of Razor::Config[key] write Razor.config[key]