shared ptr in cython

use shared pointers for almost all memory management.  Including at the cython level.

not quite done yet, I still have some more things to do