add compiler pass for bundles to register mappings

use the compiler pass added to the doctrine bridge to provide a nice compiler pass for bundles. See https://github.com/symfony/symfony/pull/7599 and https://github.com/doctrine/DoctrineBundle/pull/177

documentation PR is at https://github.com/symfony/symfony-docs/pull/2507

this is used for example in https://github.com/FriendsOfSymfony/FOSUserBundle/pull/1081