BF: refactor conditional compiling again

Add ability to use custom code for compiler flag checks, so we can check
for missing headers.
RF: add link flags option to optional compile

Allow optional compile to pass link flags separately from compile flags.
DOC: fix docstring for flag checking

Update docstring for new API.
Merge pull request #453 from matthew-brett/fix-conditional-compile

BF: refactor conditional compiling again
DOC: fix docstring for compile-time checker

Update docstring for new parameter names.
Merge pull request #454 from matthew-brett/conditional-compile-docstring

DOC: fix docstring for compile-time checker