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