Add support for network>=2.6

network-uri was split off network; this commit uses the recommended
cabal pattern for that.
Fix ambiquity due to generalised `elem`

In base-4.8, elem has been generalised to `Foldable`, so in
combination with `-XOverloadedStrings`, something like `\c -> elem c "abc"`
can't be type-inferred anymore.