Allow apps to add/modify config js output via hook.

This will allow apps to output some dynamic data in javascript that their static javscript files can act upon.

-------

To use, connect the hook to a class method in the app in app.php:

```php
OC_Hook::connect('\OCP\Config', 'js', '\OCA\Testapp\Testapp', 'getJs');
```

Then implement the connected method in the specified app class:

```php
<?php

namespace OCA\Testapp;

class Testapp {
	public static function getJs(array $data) {
		$data['array']['testapp'] = 14;
	}
}
```

The value added to the array will appear in /index.php/core/js/oc.js

This PR replaces #6879.  **Intend to backport for 6.0.2**

--------

@DeepDiver1975 @PVince81 @jancborchardt @kabum @icewind1991 ?