improve module reloading mechanism

ideas come from Package Control