I created a followup post on expanding the WeldMain interface to support a shutdown() callback that is invoked from an Extension installed by the CustomWeldStartMain. Most of the additional code has to do with marking the WeldMain ManagedBean instance that was created by the CustomWeldStartMain with a WeldMainType qualifier so that the Extension could select the approriate WeldMain during shutdown. There still is a hacky type cast to the known default DefaultWeldMainExtension implementation class I could not figure out how to workaround.
What if you create a patch / pull-request on how you would like to see it done? :-)
On the SE side, we're very much open to suggestions.