support nif module reload and upgrade

support nif module reload and upgrade