allow apps to execute code after a service has been registered

I quickly wanted to answer https://github.com/owncloud/templateeditor/issues/12 But stumbled over the unpredictable order in which apps are initialized. So I created this simple observer mechanism that allows apps to register closures to be executed after a service has been registered.

An example is the template app, that can register itself with the server to allow other apps to register additional templates. See the above mentioned issue.

While we can use st like `\OC::$server->getSearch()->registerProvider(...)` for apps that are part of core, this allows interaction between apps ... without core needing to know about them up front.

- [ ] we might need to add `registerService()` to the `IServerContainer` interface to make registering with the server as in https://github.com/owncloud/templateeditor/issues/13 public.
Well with the code currently in place, you might execute the closures twice, if the same service is registered yet again.

If that is desired, `onServiceAvailable()` always needs to add stuff into the array.
If not you need to remove the list of executed closures here. but the current way is inconsistent and may cause confussion because your service is started mulitple times or one time only, depending on the order.