Upgrade rails to 4.0.5, fix related issues

also upgrade other gems

Squashed commit of the following:

commit 0a9aa395cf51cea8fc17c76b9000e95416b67e78
Author: Thomas Schank <DrTom@schank.ch>
Date:   Tue May 20 16:07:06 2014 +0200

    Fix yet an other permit probblem

commit cfe407f4115978c0e52d948ddc95b35f5d8574df
Author: Thomas Schank <DrTom@schank.ch>
Date:   Tue May 20 12:51:47 2014 +0200

    Fix filter set controller

commit 9f42dac76d24d4dc39297154e59304e355cd9f01
Author: Thomas Schank <DrTom@schank.ch>
Date:   Tue May 20 12:36:23 2014 +0200

    Fix perm params and more when updating arcs

commit 778c803761f72d9d3d9efd2fa2a071191abdf80c
Author: Thomas Schank <DrTom@schank.ch>
Date:   Tue May 20 11:58:23 2014 +0200

    Permit attributes in permission controller

commit 58c54f2ec54ed708f814e72d34935ebe85db66e0
Author: Thomas Schank <DrTom@schank.ch>
Date:   Fri May 16 15:24:42 2014 +0200

    Upgrade to Rails 4.0.5; upgrade gems
app: error handling: make custom Error Classes that can be `raise`d

Fixes the infamous `not_authorized` mess:
`raise UserForbiddenError` instead of `not_authorized!`
doc: dev guide: add informal spec about individual contexts aka vocabularies
Upgrade stable version to 2.0.4
UI/UX: context => vocabulary revamp step 1/3

- rename all instances of '(meta_)context' to 'vocabulary'
- implement new unified design (combines context, vocabulary and abstract)

still missing:
- some counting queries
- optimize/consilidate existing queries
- fix tests
- polish (step 3)
Revert "UI/UX: context 1/3" since tests fail

This reverts commit f9cebb3c07f89a8e5f5880124b7e7493adc419bb.
prepare routes and tab-navigation
import raw html from styleguide for mockup
more structuring: controller method, partials
more structuring: tab navigation, partials also for media_sets
throw out static mockup, build with haml and data. cleanup unused templates.
#tmp: directly edit style guide. add data-properties for scripting.
js: implement filterbar functionality (in style guide) #tmp
js: implement slider functionality (in style guide) #tmp
slider: grabHandle: use correct typographic entities (thin space, multiplication sign)
start of porting new design to media_sets
more #cleanup
move js from styleguide to templates, fake missing count data with random
tmp: mark where the 'count' would go in the json helper
ui: filterbar: make displaying of resources-type-filter conditional; turn it off in context/entries