Create module for advanced search functionality.

To allow the functionality in the archival storage search to be
reused, created a new module for it.