When Openfire is shut down, federated users that are in a MUC room don't get any notification (Local users don't get any either, apart from their connection being closed).
XEP-0045 describes a presence status code that notifies users of a MUC service shut down. We should send that.
akrherz voiced concerns that this could be resource intensive and/or postpone or prolong an orderly shutdown. Both concerns should be taken into account.
In order to prevent a prolonged shut down, this commit:
ensures that a shutdown routine is executed just once (instead of for each type of interface being shut down: module,component and listener)
the presence stanza that is sent is constructed using in-memory objects only (no database lookups)
all notification occur in a thread pool, which will concurrently process them, but will terminate forcibly after a certain amount of time.