fixes #2121, #2069 - restrict importers and ENC to puppetmasters and users

CVE-2013-0171: report and fact importers parse YAML directly from the remote
host without authentication.  Untrusted YAML can instantiate objects and be
used to exploit Foreman.

CVE-2013-0174: external nodes (ENC) output is available to any source and
could contain sensitive information, e.g. root password.

The restrict_registered_puppetmasters setting (default: on) now only permits
access to the three routes if the remote host has a smart proxy registered
with the Puppet feature.

The require_ssl_puppetmasters setting (default: on) requires a client SSL
certificate on HTTPS requests.  The CN is checked against known smart proxies
as above.  :require_ssl in settings.yaml is recommended to disable HTTP.

Ensure ENC (node.rb) and report (foreman.rb) scripts are updated to supply
client SSL certificates.
refs #2069 - enable auth by default

Without authentication, sensitive information and power is available to all,
so improve security out of the box.
Fix home mapping in API v2

Home controller is in v1, mapping all the routes from scope for v1
except the final fallback, that needs to go to the end of routes file.

Oterwise status is not working for V2.
fixes #2136 hyperlink host properties
fixes #2145 Host Search not working by user
updated fog version, as a few vmware related bugs where fixed
fixes #851 - display diff view on Puppet file content change

new version of ace editor, better diff colors, diff in report show page.
fixes #2147 - param classes with multiple matchers are evaluated incorrectly
[test] renamed wrong class name
Make sure we're not merging nil in to_json

Options argument might be nil. Therefore it fails when trying to call
{}.merge(options) (for example when recording examples with apipie).
fix import classes button
remove add-class tooltip.
lighter style to the host status labels.
refs #2041 - changed puppetclass/:id/parameters from put to post.
fixes #2151 - use DN environment variable instead of CN

nginx is unable to pass bits of the X.509 subject, only the entire DN, so
support that as a lowest common denominator.
fixes #2146 - prevent double render
refs #2146 - ensures redirect does not break on api requests too
fixes #2126 Large report messages won't fit in PostgreSQL's index_messages_on_value
fixes #2138 - Ensure at least one Location / Organization exists
refactor - move clone taxonomy to models