Cleanup some of the build macros and add __has_builtin
Add framework for compile time type checking