For open, you can probably use plugin_loaded with an 'already loaded' global variable.
loaded = True
For cleaning up subprocesses on close, you can fork a subprocess that monitors sublime. If the sublime process disappears, you can do cleanup. This isn't super portable, but you can use third-party modules like psutil to help or check your platform and use ctypes on Windows.