Fix order by statement

Previously, function was invoking concat() function in the order
by because INET() (Subnet.first_ip and Subnet.last_ip) are defined
as CHAR(39). Thus, the code had only been sorting by most full
subnets by accident.

Added a UT which failed existing code, but succeeds with new code.

RM10575