add destroy handler for NPAPI plugin instance
use smartpointer for NPAPI plugin instance from script state