Autoload generator test improvements

AutoloadGeneratorTest changes factored out of https://github.com/composer/composer/pull/2563

* No PSR-4 with target-dir.
* Docblock and linebreaks.
* Rename $package to $mainPackage in AutoloadGeneratorTest::testOverrideVendorsAutoloading() for clarity.

I'm ok to rebase some of this.