Port elements of the build system from ndiswrapper

This eliminates compilation to find the kernel version. The new Makefile
provides more sanity checks and more verbose reporting.