Filter allowed permissions consistently

Squashed commit of the following:

commit 9d5efccbec18cdedc18ccb22f66f27efa4e4d8b0
Author: Thomas Schank <DrTom@schank.ch>
Date:   Wed Mar 26 14:20:14 2014 +0100

    Fix controller

commit d80f763870322b6e252a66877f1c80ddbc802fca
Author: Thomas Schank <DrTom@schank.ch>
Date:   Wed Mar 26 14:14:19 2014 +0100

    ...

commit 96c221bdb4a40e6866b533feb63e41776b769dff
Author: Thomas Schank <DrTom@schank.ch>
Date:   Wed Mar 26 13:51:43 2014 +0100
Compile assets for API documentation
Use content-type application/hal+json throughout the api
Get rid of warning, set config.i18n.enforce_available_locales = false
Admin interface: meta-terms improvements

Squashed commit of the following:

commit fe19c68b09111ffad52b25bf1fe26b9700573e11
Author: Michał Podlecki <m.podlecki@op.pl>
Date:   Tue Mar 25 14:01:52 2014 +0100

    add a reset button that clears all searching, filtering and sorting

commit b87309f5320b6edef804c76ded122e90e2811fe4
Author: Michał Podlecki <m.podlecki@op.pl>
Date:   Tue Mar 25 11:44:48 2014 +0100

    additional feature tests for remembered params

commit 15a64635c3316b6903311abcbed1eef95e0d6700
Author: Michał Podlecki <m.podlecki@op.pl>
Date:   Tue Mar 25 10:16:50 2014 +0100

    ignore .ruby-gemset file

commit 0cd34414d0d368d79bffcdd2ccccf768de88911a
Author: Michał Podlecki <m.podlecki@op.pl>
Date:   Tue Mar 25 10:16:30 2014 +0100

    fix broken feature tests

commit 4ea16e8ef77d1438ffb8a4c8f542cd636439bdf7
Author: Michał Podlecki <m.podlecki@op.pl>
Date:   Tue Mar 25 10:05:19 2014 +0100

    remember url params between meta_terms' actions
Admin interface: settings improvements

Squashed commit of the following:

commit 703127f7cee5a0a3a3a68df12b61d41e4143c896
Author: Michał Podlecki <m.podlecki@op.pl>
Date:   Thu Feb 13 15:06:51 2014 +0100

    Squashed commits:

    show settings page as index view

    add edit links on settings page

    settings are editable via their edit pages

    edit media set on its details view

    fix broken feature tests
ui: permission management: support API Applications

delivers: [#68169406]

Squashed commit of the following:

commit be0c33f09d4855676eda1071c83bc5e82dca286c
Author: Max F. Albrecht <1@178.is>
Date:   Thu Mar 27 18:09:53 2014 +0100

    ui: js: permissions: make controller more resilient (also faster)

commit f1ab4b74a753219d9119d0151d4f1b28c7e6453a
Author: Max F. Albrecht <1@178.is>
Date:   Thu Mar 27 18:09:08 2014 +0100

    ui: js: permissions: small template fix

commit 3c5d1851def959cc13d79b7ddd597ac0ac3ff21a
Author: Max F. Albrecht <1@178.is>
Date:   Wed Mar 26 16:53:59 2014 +0100

    ui: js: permissions: on "show", hide 'applications' section if there are none (always display on "edit")

    related: [#68169406]

commit 56af246f1c3e1ca5edf2cad6be98ff0e1ea7a8fd
Author: Max F. Albrecht <1@178.is>
Date:   Wed Mar 26 16:51:02 2014 +0100

    ui: js: permissions: finish support for API applications

commit 34dfd0a02ab1c62555dcbc3c0c43b863896afb38
Author: Max F. Albrecht <1@178.is>
Date:   Tue Mar 25 19:29:42 2014 +0100

    ui: js: controller: permissions: slightly refactor for clarity, sanity and performance

commit 1214139d136b06f6721e69a96ab8674815937547
Author: Max F. Albrecht <1@178.is>
Date:   Tue Mar 25 19:02:08 2014 +0100

    ui: js: controller: permission: fix autocompleting and selecting applications

commit 508b7a639b349c38adcced59c29f8f612d9f08f2
Author: Max F. Albrecht <1@178.is>
Date:   Tue Mar 25 18:26:50 2014 +0100

    app: add applications controller for handling API applications (internal API)

commit 674d31c8e94a606cc5630f935b0f47370bd85307
Author: Max F. Albrecht <1@178.is>
Date:   Tue Mar 25 14:35:57 2014 +0100

    ui: permissions: start support for 'API Applications'
app: controller: applications: implement search function (internal API)
Fix typo in permissions#upload and schema of personas db