Cython shared ptr

all pointers in cython wrappers for mc modules have been replaced with shared_ptr, this should make sure that memory is not freed even if python/cython decide that the modules have gone out of scope. We expect that cpp will have the last say on when the memory should be freed