[RFC] jp/cpp_fixes

Added various fixes and improvements for wrap_cpp. This branch is currently used for generating functional C/Julia wrappers for a C++ library in https://github.com/jpata/ROOT.jl.