engine: Created DB function fn_get_comparable_ip_list

The function converts a string of IP addresses, as stored in the
database, to an array of numbers, thus enabling sorting IP addresses
numerically rather than lexicographically.

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