fixed parsing Mongo DSN and added Test for it

Applied Coding Standards patch

Applied Fabien's comments

[WebProfilerBundle] fixed parsing Mongo DSN and added Test for it

Removing whitespaces

Applied fabbot patch
bug #10146 [WebProfilerBundle] fixed parsing Mongo DSN and added Test for it (malarzm)

This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes #10146).

Discussion
----------

[WebProfilerBundle] fixed parsing Mongo DSN and added Test for it

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

Commits
-------

5cd274b [WebProfilerBundle] fixed parsing Mongo DSN and added Test for it