Make changes to copied-over configuration.

* Remove references of OAuth which is not moved yet.
* Change RAILS_ENV to Rails.env for Rails 4.
More one-time config needed for gadgets.
Fix the Gemfile. Enable gadgets gem.
Fix routes for gadgets.

* Remove temporary routes.
* Remove 'catch all' route which was overriding the engine's routes
  which were added later by Rails (meaning, after the 'catch all').
* Fix resources route in gadgets. It is now more similar to its original form.
Set site URLs properly.

They need to be set on to the current thread so that they can be used by the gadgets gem.
Fix 'SSL not configured' error view.

* This is used in the most bizzare way, in plugin_ssl_helper.rb
Fix view: List and add new gadget client view form.
Fix validations.