[DomCrawler] Added auto-discovery of namespaces in Crawler::filter() and Crawler::filterByXPath().

Improved content type guessing.
[DomCrawler] Made sure only the default namespace is removed when loading an XML content.
[DomCrawler] Added more tests for namespaced filtering.
[DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().
[DomCrawler] Added support for an automatic default namespace registration.
[DomCrawler] Updated the CHANGELOG with namespace auto-registration details.
[DomCrawler] Enabled default namespace prefix overloading.
[DomCrawler] Enabled manual namespace registration.
[HttpKernel] fix usage of deprecated FlattenException
Fixed an entity class name.

Broken in #7940.
merged branch jakzal/benchmark-tests-fix (PR #9117)

This PR was merged into the 2.2 branch.

Discussion
----------

Fixed an entity class name in a benchmark test

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Broken in #7940 (67ba1314580ad63cbbf923b59157f226210d62ce). Since benchmark tests are not run on travis, it didn't complain.

Commits
-------

50ff35a Fixed an entity class name.
[DomCrawler] Removed checks if CssSelector is present.
[HttpFoundation] Remove useless reflection usage in MetadataBagTest
Run all tests in parallel.
merged branch jakzal/travis-parallel-tests (PR #9018)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9018).

Discussion
----------

Parallelized travis builds

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Yet another approach to running all tests in parallel (see #7708 and #8312).

This one uses [GNU Parallel](http://www.gnu.org/software/parallel/) which by default [will run one job per available CPU](http://www.gnu.org/software/parallel/man.html#jobs_n).

Comparison of random builds (recent build times on my travis account):

| PHP version| [master](https://travis-ci.org/jakzal/symfony/builds/11300678)             |  [parallel](https://travis-ci.org/jakzal/symfony/builds/11300689)
| ------------- | --- | ---
| 5.3.3| 6 min 11 sec | 3 min 45 sec
| 5.3| 7 min 26 sec | 4 min 10 sec
| 5.4| 6 min 31 sec | 3 min 31 sec
| 5.5| 6 min 37 sec | 3 min 45 sec

On my laptop it takes 1.5min to run a whole suite parallelised (compared to over 4min when run as usual).

Commits
-------

de8d1b5 Run all tests in parallel.
merged branch Tobion/flattenexception (PR #9111)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] fix usage of deprecated FlattenException

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9108
| License       | MIT

Commits
-------

8bad61d [HttpKernel] fix usage of deprecated FlattenException
merged branch adrienbrault/metadata-bag-test (PR #9118)

This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] Remove useless reflection usage in MetadataBagTest

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | np
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

ea27961 [HttpFoundation] Remove useless reflection usage in MetadataBagTest
Merge branch '2.2' into 2.3

* 2.2:
  Run all tests in parallel.
  Fixed an entity class name.

Conflicts:
	.travis.yml
	src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
Merge branch '2.3'

* 2.3:
  Run all tests in parallel.
  Fixed an entity class name.
  [HttpKernel] fix usage of deprecated FlattenException

Conflicts:
	src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
merged branch jakzal/domcrawler-namespace-autodiscovery (PR #6650)

This PR was merged into the master branch.

Discussion
----------

[DomCrawler] Added auto-discovery and explicit registration of namespaces in filter() and filterByXPath()

| Q | A
| --- | ---
|Bug fix: | no
|Feature addition: |yes
|Backwards compatibility break: | yes, default namespace is no longer removed in the `addContent` method
|Symfony2 tests pass: | yes|
|Fixes the following tickets: | #4845
|Todo: | -
|License of the code:| MIT
|Documentation PR: | symfony/symfony-docs#2979

* added support for automatic discovery and explicit registration of document namespaces for `Crawler::filterXPath()` and `Crawler::filter()`
* improved content type guessing in `Crawler::addContent()`
* [BC BREAK] `Crawler::addXmlContent()` no longer removes the default document namespace

I mentioned in #4845 it would probably be possible to use [DOMNode::lookupNamespaceURI()](http://www.php.net/manual/en/domnode.lookupnamespaceuri.php) to find a namespace URI by given prefix. Unfortunately we cannot use it here since we'd have to call it on a node in the namespace we're looking for.

Current implementation makes the following query to find a namespace:
```php
$domxpath->query('(//namespace::*[name()="media"])[last()]')
```

Commits
-------

77e2fa5 [DomCrawler] Removed checks if CssSelector is present.
9110468 [DomCrawler] Enabled manual namespace registration.
be1e4e6 [DomCrawler] Enabled default namespace prefix overloading.
943d446 [DomCrawler] Updated the CHANGELOG with namespace auto-registration details.
c6fbb13 [DomCrawler] Added support for an automatic default namespace registration.
587e2dd [DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().
c905bba [DomCrawler] Added more tests for namespaced filtering.
6e717a3 [DomCrawler] Made sure only the default namespace is removed when loading an XML content.
e5b8abb [DomCrawler] Added auto-discovery of namespaces in Crawler::filter() and Crawler::filterByXPath().