cpp: define cb types for C++

* All callback types replaced with wrappers (std::function) for cpp.