Allow marking newly discovered nodes as 'installed'

This adds a configuration option, `protect_new_nodes`, which if set to a true
value causes all newly discovered nodes to be marked installed at the exact
same moment.

This will result in the default behaviour of Razor changing from "install
based on policy" to "install based on policy once a node reinstall is
explicitly requested", a much safer default for users.

By default Razor will continue to assume that it controls everything on your
network, and treat any newly discovered node as a candidate for immediate
installation according to policy.

https://tickets.puppetlabs.com/browse/RAZOR-152

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Automatically type-check array and object entities in validation

When an `object` or `array` helper is used for an attribute, we already know
what type the entity is -- so we can automatically set that check in the
attribute code.

This allows things like `size` checks to be applied more naturally to
`object` or `array` attributes, too, without having to manually add the
`type` check.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Automatically maintain `installed_at` field of nodes

Previously every location in the code that set the `installed` field on a node
also hand-maintained the `installed_at` field.  This replaces that with an
extension to the setter that automatically updates the value, codifying this
behaviour for all external callers.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Add `register-node` command to pre-register nodes with Razor

In order to make brownfield deployments of Razor easier we allow users to
register nodes explicitly.  This command allows you to perform the same
registration that would happen when a new node checked in, ahead of time.

In order for this to be effective the hw_info must contain enough information
that the node can successfully be matched during the iPXE boot phase.

If the node matches an existing node, in keeping with the overall policy
of commands declaring desired state, the node installed field will be
updated to match the value in this command.

The final state is that a node with the supplied hardware information,
and the desired installed state, will be present in the database,
regardless of it existing before hand or not.

https://tickets.puppetlabs.com/browse/RAZOR-151

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Delete unpacked iso on repo deletion

When issuing the `delete-repo` command, the unpacked repo was being left on the filesystem. This change cleans up this folder, if it exists.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-202