Add a more friendly C++ wrapper for our C API

See commit messages.