Merge remote-tracking branch 'quoin/rails_4.0_upgrade' into rails_4_upgrade

Conflicts:
	.gitignore
	Gemfile
	Gemfile.lock
	app/controllers/api/device_controller.rb
	capybara_features/step_definitions/children_setup_steps.rb
	capybara_features/step_definitions/replication_steps.rb
	capybara_features/support/hooks.rb
	config/application.rb
	config/environments/cucumber.rb
	config/initializers/session_store.rb
	config/recipes/templates/couch_config.erb
	lib/rapid_ftr/form_section_setup.rb
	spec/controllers/api/api_controller_spec.rb
	spec/controllers/database_controller_spec.rb
	spec/lib/security/authentication_spec.rb
	spec/support/fake_login.rb