AXIS2-5646: Fixed an IllegalStateException triggered during shutdown of the Axis2 OSGi module:
* Applied the patch submitted by Andy Schmidt (with some minor formatting changes).
* Enabled the regression test for this issue.

git-svn-id: https://svn.apache.org/repos/asf/axis/axis2/java/core/trunk@1594701 13f79535-47bb-0310-9956-ffa450edef68