initial C/C++ QR encoder with upstream fixes