Move results filtering to  db.
Move results filtering to  db.

This patch moves exact filter and regex filter matching on the listing of
instances to the database query. This is important so that we can eventually do
all pagination through the database.

If the db backend does not support regex matching then the SQL 'LIKE' operator
will be used instead.

Change-Id: If9dd644066787f0f3667992f23e5c33b1dc90286

n0ano/gantt,n0ano/gantt