Add preFileDownload event on package.json fetch
Merge pull request #2434 from JJK801/extend-pre-file-download

Add preFileDownload event on packages.json fetch
Fix vcs repo constructor, fixes #2444
Fix pear ctor, refs #2444
Only replace version in Composer.php, fix user agent
Add test for RepositoryManager repo creation
Detect failed gethostbyname, refs #2449
Force unresolvable hosts through proxies, fixes #2449
Fix previous commit
Update deps
Fix exit codes, cc @tyrael
Use 'cache-files-ttl' for cache gc, fixes #2441

The configuration option 'cache-ttl' was used instead of 'cache-files-ttl' to determine
whether or not a cache gc should be performed.

* changed 'cache-ttl' to 'cache-files-ttl' to determine if a gc should be performed
* refactored FileDownloader to allow for easier testing
* added test to ensure that the gc is called with the proper config option
Merge pull request #2453 from mirkobeine/#2441-V2

Use 'cache-files-ttl' for cache gc, fixes #2441
Add warnings for xdebug, fixes #2425
Add PSR-4 class loader. (tests needed)
PSR-4 class loader: Add getters for PSR-4 prefixes. Rename PSR-0 related attributes by appending *Psr0. Add more comments.
PSR-4 loader: Fix comments: PSR-0 related methods should have comments refering to PSR-0 and prefixes. PSR-4 related methods should have comments refering to PSR-4 and namespaces.
Further improve comments.
PSR-4 ClassLoader: Bug fix: PEAR-like path needs ".php" appended.
Add unit tests for ClassLoader, covering PSR-0 and PSR-4.