make set_debug a no-op if it doesn't change the flag state
use m-file interface instead of mex-file interface
add contents doc
move doc stuff into contents file
add m-file interface to replace mex-file interface.  of course, you can still call the mex-file directly if you want.