Polished the catalogueTree plugin controller

1. Renamed queryString to query.
2. Switch to using JPA magic function to get objects directly
3. Since the search function would traverse from the top protocol to the bottom features. A pre-search takes place before search function across all the protocols, features, categories in case the query is not matched to anything. If nothing is matched, the result can be returned immediately, the search function will not be called.