chore(di): Adopt PHP DI

TODO:
 - [x] Ensure support for `mod/plugin/classes/Ns_Class.php` is still present
 - [x] Rewrite Elgg_ClassLoader construction as factory so it's clearer
 - [x] Switch to namespaces (#7104)
 - [x] Leave switching to PSR-4 for another PR
 - [x] Add "Fixes #6387"
Di object would create a new instance. We want to reuse the same instance

On Tue, Dec 2, 2014, 4:27 PM Steve Clay <notifications@github.com> wrote:

> In engine/di.php:
>
> > @@ -0,0 +1,92 @@
> > +<?php
> > +namespace Elgg;
> > +
> > +use DI;
> > +use DI\Container;
> > +use Elgg\Queue\DatabaseQueue;
> > +use Elgg\Notifications\NotificationsService;
> > +
> > +return array(
> > +	'access' => DI\link('Elgg\Access'),
>
> Why don't we use DI\object() for specifying classes?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Elgg/Elgg/pull/7102/files#r21204259>.
>