Added some methods to improve the handling of auto_mapping feature

| Q             | A
| ------------- | ---
| Bug fix?      |no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?  | yes
| Fixed tickets | https://github.com/doctrine/DoctrineBundle/issues/60
| License       | MIT


This PR is a part that is required by:
* https://github.com/doctrine/DoctrineMongoDBBundle/pull/267
* https://github.com/doctrine/DoctrineBundle/pull/321

The proposed PRs are an alternative to https://github.com/symfony/symfony/pull/11650 and https://github.com/doctrine/DoctrineBundle/pull/322
hmm... you are right! i was thinking that `mongodb-odm-bundle` and `doctrine-bundle` are using version constraint as `>=2.1, <2.6`... but looking at their composer.json, the version constraint is `~2.1`... this means that i have to revert my last commit :(