split marshall.cpp into marshall.cpp and hs_tools.cpp
when casadi returns a reference, make a ForeignPtr copy of it so that casadi can GC it
don't marshell MX& -> MX -> MX&