Cython shared ptr

this does the same for mcpele as to pele-python/pele#48

this depends on the pele PR, so this must be merged after