ns_markfordelete
This function marks the current Tcl interpreter for deletion when the connection or thread is closed.