unload the extension, while closing the Matlab process.

Also: error handling when no Matlab process is running.