Add Config::transact

Use this method to avoid emitting unecessary config events
when activating or deactivating multiple packages