fixes #2877: deletion of the organization or location in the context no longer breaks the session
API and Regular authentication refactor
Regular authentication had SSO, and http basic auth. API had Oauth
and http basic. This basically merges them both into a single file,
since there was a lot of overlap between application_controller and
api base_controller. A major benefit this brings is the possiblity of
using Apache REMOTE_USER authentication through the API which was
not possible before.

Assert_response is the proper way instead of assert_equal

Moved Basic and Oauth to SSO

Logout url in Apache

Code cleanups

Basic Authentication tests

OAuth tests

Add login_url to be the default url services redirect to

Fix OAuth test 'authenticate is user.current is not set'

Make api and base controller use 'login_url' from SSO service if they need to redirect to them

Signo test tests controller redirect not SSO redirect
Refs #2414 - Remove Puppet from facts API and Settings

Reports are still in progress and will come in a later PR
DB schema is updated to not need puppet/rails
Reports WIP
Fix report tests
Remove nasty lib hacks from facts-side PR
Fixes #2966 - Output log level in GET:/reports/:id
WIP API report
Remove create from UI report controller
Delete useless json reports (new ones coming) ; migrate controller tests to api controller test object