Add C++ RPC client test: fixes #341