Squashed the rails4 branch on top of next

Conflicts:
	Gemfile
	Gemfile.lock
	app/assets/javascripts/controllers/permissions_controller.coffee
	app/assets/javascripts/views/permissions/index.tmpl.haml
	app/assets/javascripts/views/permissions/line.tmpl.haml
	app/assets/stylesheets/combos/_ui-rights-management.sass
	app/controllers/permissions_controller.rb
	app/models/concerns/resources_through_permissions.rb
	app/models/userpermission.rb
	config/routes.rb
	db/empty_medienarchiv_instance_with_personas.pgsql.gz
	db/structure.sql
	features/batch_edit_permissions.feature
	features/permissions_02.feature
	features/step_definitions/i_c_steps.rb
	spec/models/media_resource/media_resource_spec.rb