Fixed sorting by network address/gateway in admin (incl. migration).

Network model gets new field ``gateway_as_int``, which is used for sorting by "Gateway address" column ("Network address" column now uses ``min_ip`` field for this).