gre: Add functions to determine address type to compat layer.
Allows older kernels to classify IPv4/IPv6 addresses as loopback,
broadcast, etc. The IPv6 functions actually exist in all supported
kernels but add a dependency on the IPv6 code on older kernels (they
are always available on more recent kernels). This allows us to
process IPv6 packets without dragging in the entire IPv6 subsystem
if it is compiled as a module (such as on Xen). This is only done
for packets that are passing through the system and does not use
the IPv6 core if it is not configured.