Allow Accept-Encoding header to be overridden by request headers
combine double if into single conditional
remove unused 'use DOMXPath' and property count and xpath
fix typo 'consist' should be 'consists' in singular
improve conditional by combine in one block
Reduced the #calls of rawurlencode() using a cache
Fix Zend\Console\Getopt::getUsageMessage()

Getopt::getUsageMessage() no longer throws a warning, when freeform flags
are available and the parameters are already parsed via Getopt::parse().
Freeform flags will not show up in Getopt::getUsageMessage().

Added two tests to ensure this.
Applying quickfix for zendframework/zf2#3004
Merge pull request #3039 branch 'hotfix/combine-conditional'
Merge commit 'refs/pull/3048/head' of github.com:zendframework/zf2 into hotfix/fix-covers-tag
Merge pull request #3048 branch 'hotfix/fix-covers-tag' Close #3004
Merge commit 'refs/pull/3042/head' of github.com:zendframework/zf2 into hotfix/typo
Merge pull request #3042 branch 'hotfix/typo'
Adding failing test for zendframework/zf2#3033
Fix error checking on Zend\Http\Client\Adapter\Socket->write().
hotfix : The annotation @\Zend\Form\Annotation\AllowEmpty declared on  does not accept any values
using assertSame instead of assertEquals and change 'true' with true
Fixed #3051
* Added router and routeMatch to toArray method
* Modified testToArrayMethod
remove unused 'use Zend\Mvc\Exception' in Zend\Mvc\Controller\AbstractController
changeed it back 'consist' => the 'must' should be applied to all parts of the sentence