core: Allow Template sorting according to missing fields

This patch makes it possible to sort search results according to
template version name and version. This enhancement was needed as we
also want to sort by these fields in the ui.

Signed-off-by: Frantisek Kobzik <fkobzik@redhat.com>
Change-Id: I02fdb98b6d7eea5e7379fb1d19ee9625402caf72
Bug-Url: https://bugzilla.redhat.com/1104784