Refactored OAI-PMH ListMetadataFormats response.

refs #3890

Refactored OAI-PMH ListMetadataFormats response logic.