Fixed plugin reload use-after-free
Fixed perl VM double-termination (through PERL_SYS_TERM()'s double-call)