engine: Added ability to affect sort order in search

Added to the search mechanism a generic way for developers to override
the default sort order according to a field in the database, without
affecting other conditions related to that field.

Change-Id: I80b65dacdccc208c8c7e0f2564f2660782d36d69
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=895468
Signed-off-by: Lior Vernia <lvernia@redhat.com>