Allow setting and resetting the global adaptation manager.

The global adaptation manager is used by traits for automatic
adaptation. Setting and resetting it is useful at application
start-up, but especially during testing to reset the global
state.