Move util/ out of app/core/ + cleanup

It’s actually used outside core too, so it makes sense to bring it to a
higher level in directory hierarchy.

Removed unused factory and mixin utils.
Classical inheritance: Function.prototype.extends

Implementation inpired by “Pro JavaScript™ Design Patterns” by Ross
Harmes and Dustin Diaz.

Too bad to extend the built-in Function class, but I just coulnd’t find
a good naming scheme without it.
Deferrable: resolved() and rejected()

I need these to shortcircuit promise-based functions.
functionNames: returns an empty array for when no functions found
AuthenticationServiceInterface: more error messages