- Make static library instance refpointed.
- Tie import_thread lifetime to library ctor/dtor.
- Stop() import_thread before deleting.