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)