Add Response::factory() override to add a default config to every Response.
This is used to ensure that even error responses have the headers we want.
Also, move the X-Frame-Options setting here from Controller::execute().
Add Rest::init(), revise rest/init.php and Controller_Rest::after() to match.
Rename Controller_Rest_Login --> Controller_Rest_AccessKey.
This is more inline with giving it a resource name, not an action name.

--HG--
rename : modules/rest/classes/Controller/Rest/Login.php => modules/rest/classes/Controller/Rest/AccessKey.php
rename : modules/rest/classes/Rest/Controller/Rest/Login.php => modules/rest/classes/Rest/Controller/Rest/AccessKey.php
Fix class declarations and init following rename.
Remove some old rest code that's already been re-implemented for K3.
Add Controller::auth_for_maintenance_mode() & auth_for_private_gallery().
Moving these two separate functions means we can process them differently
for REST.
Revise REST login setup.
- update Controller_Rest::check_auth() to use new functions from last commit.
- add comments around Controller_Rest::check_auth().
- revise Controller_Rest_AccessKey to follow new format.
Revise Controller_Rest::before() & after() - add comments, debug.
Revise Auth::validate_login() to trap non-existent password fields better.
Before, if the "password" key didn't exist in $data, Validation would still
fail, but the error would be because of a non-existent offset, which isn't
the right way to report it.
Handle allowed/disallowed REST methods a bit more cleanly.
- add "Allow:" HTTP header.
- fire 405 when the method is not allowed.
- fire 400 when the method is allowed but undefined for the resource.
- add @todo comment to consider checking other method override headers.
Fix comment typo in Controller_Rest::after().
Fix formatting in Rest.
Revise Hook_RestEvent::user_edit_form_admin() for Formo / K3.
Also, remove unused g-form-static class (nowhere in core or contrib repos).
Merge pull request #382 from shadlaws/fixes_20130604

Fixes 20130604