cmake-work

Initial splitting up and cleanup of CMake code (looking for feedback for now; merging would be best held off until the other directories have the same treatment). I'll add comments inline as to where some things need attention yet.
So this is the problem for FreeBSD 10.0. Change the `1` to `201112` to expose the IPv6 structures.