Remove old C API and support code needed for it

Now that we moved old clients to use new C API, we remove the old. See
rationale for our new C API in commit
7300aa3a4f0e5f6754e737a003a4dd67d401bf2f.