cleaner C99 and C++ inline funcs and includes

- avoid including systems headers from within extern "C" {} block
- protect inline funcs with per-file macros for pre-c99 compilers to
  be able to generate out-of-line funcs without including header twice
cleaner C99 and C++ inline funcs and includes

- protect inline funcs with per-file macros for pre-c99 compilers to
  be able to generate out-of-line funcs without including header twice