ui: js: meta_data: departments: filter LDAP groups with black- and whitelist

Squashed commit of the following:

commit 0c821020f7eb4dab8f4d71ca992361426f042d8a
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 17:13:24 2014 +0200

    make more defensive, only filter if there is data

commit d7e26a580c83a8240080820c428f426586df3787
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 17:02:56 2014 +0200

    cleanup #2

commit bd6a94c462943482c3651a90321c769b58d8c19c
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 16:51:23 2014 +0200

    cleanup

commit e2c63ac68a1252cf7127ddeb20dc628c3e04e7ab
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 16:01:05 2014 +0200

    implement filtering with black- and whitelist

commit 78a2cf9cc57a5277d5a929f04e004cda1049b0e2
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 16:00:52 2014 +0200

    add black- and whitelist

commit 6c0c0219d449f8b5ada478dbee806e45de8271e3
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 13:43:23 2014 +0200

    Revert "remove dead code"

    This reverts commit 75bbdb930bb3e0da774d4e8ef4d6b7080d0bef47.

commit c5facd1994fbbf448ae93ef58491581efb7621e2
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 13:42:20 2014 +0200

    remove dead code

    (possibly)

commit 61e7a353a807d458a88be57b16650eb11b489383
Author: Max F. Albrecht <1@178.is>
Date:   Tue Oct 7 11:37:07 2014 +0200

    cleanup