In /top mode, search all items but only show top-level items

Previously, a /top request didn't search child items. Now, searches are
performed against all items, and /top causes the parents of any matching
items to be shown instead.