Tidy C++ header-only definitions for parts of the C API of R
