gnetworkmonitorbase: Use a hash table for storing networks
gnetworkmonitorbase: Use a hash table for storing networks

Rather than using an array, which requires a lot of iteration over it to
check whether a particular network is present. Using a hash table only
requires iteration in the can_reach() case, where we need to match a
mask in the networks array, rather than equal it.

This should improve performance for large numbers of routes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1925

endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib