Refactor AtlasMain to instantiate an instance which can be sorted in the
webapp context for access to the number of connections metric through
health probes loaded with a different classloader.

A utility static method is provided which performs the required
reflective calls to access methods on a supplied AtlasMain, since it will
be called from a class loaded through a different classloader, so that
classloader's AtlasMain would differ from the AtlasMain stored in the
context.