Move checks for network types to m4/networking.m4

The checks for the availability of types related to networking belong
into m4/networking.m4, not into configure.ac.