Add ability to verify container before compile.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| Refs tickets  |
| License       | MIT
| Doc PR        | 

Pending doctrine/DoctrineBundle#219