Scilab, R and Octave shared_ptr typemaps null fix

Merge changes from Python/Ruby equivalent files to obtain a fix
for NULL handling of T*const& typemaps.
3 files changed