Refactor packages filter and list methods

Change-Id: Idfb4d0a55775300f560e209c417ede663b904551
Partially-implements: blueprint app-catalog-search
Merge "Refactor packages filter and list methods"