5x search result export metadata

https://jira.duraspace.org/browse/DS-1262

Sorry for the previous bad design attempts at this feature. In the future I will test and confirm correctness before submitting pull request. I hope this has minimal mistakes and meets the requirements of the JIRA ticket.
I'm not saying it's necessary to remove them, I was only asking because it wasn't immediately obvious to me. However, if there's code duplication, that may lead to one of them later being updated and the other one left as-is, resulting in different behaviour. If possible, the shared code should live in one place that is called by both.