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.
This section of code pulls the handle from the URI if the search is performed under a collection or community. The handle is passed on to set the scope in order to export the search results under that scope.