Fix archive search and correct logging for foreign searches

Archive searches are now handled correctly
Fix debug logging for searches in foreign section
Include title fix from mr-oranges's PirateBay edition
Fix for indexerid issues with cache.
Fix for regex matching.
Merge pull request #216 from iron8core/scc_fix_archive

Fix archive search and correct logging for foreign searches
Fix for index out of range issues