liblibo: expose a C API for ABI reasons, and wrap with C++.

Change-Id: I7b3bcead05788e663d94724522bfa3f227b15499