Replace existing gob-based merge impl with proto-based impl.

Merging now takes fully in C/C++ land with no callback to Go. Mildly
less flexible, but the the proto encoding is much more compact than the
gob encoding.
TODO added.