fix uninitialized backend type in h_sequence and h_choice

Also has some C++ bindings stuff that will be overhauled soon, but it's not part of the build, and this fix needs to go into trunk. Bad build hygiene, I know. I wish I could cherry-pick in a PR.