Allow plugins to register commands

This PR will move plugins to a next level by exposing the application to the plugins (and also loads the plugins BEFORE the application starts).

It might be a start to solve few tickets like #3312 or https://twitter.com/lsmith/status/526053583834603520
ping @lsmith77

It should also fixes #1234, #2761

Sample of use
```
composer global require FriendsOfPHP/security-advisories
cd my/project
composer security-check
```

Or with the sensiolab's secret project
```
composer global require sensiolabs/secret-project
composer play path/to/a/script.php
```

Want to simply test  it see a sample plugin (https://github.com/jeremy-derusse/composer-plugin)
```
composer global require jderuse/plugin
composer demo:greet
```

Todo
* [x] Add tests
* [x] Refactor the "plugins warmup" thing

edit, in fact, I didn't move the validation in the commands who need it, I add a validation in the `Installer:create` method. (https://github.com/composer/composer/pull/3377/files#diff-74425bc790838a69d0d16f06fc313edbR1058)