Move more Doctrine related container settings in the appropriate CompilerPass

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | #1858
| Refs tickets  | ---
| License       | MIT
| Doc PR        | ---

This also makes sure they are loaded even if the core is not instantiated (e.g. when using the Symfony console).