Improved c++ bindings of libclang

Use std::shared_ptr to handle the lifetime of libclang objects