cmake support for FreeBSD
cmake: add -Wall -O2 for gcc

These are the same CFLAGS used by the autotools.
In contrast to the autotools, we can see the warnings clearly now,
since there is no other clutter.
freeBSD: fix includes

added arpa/inet.h, that should get rid of the
implicit declaration warning from LIB-27