Move some functionality from NsbInterpreter to NsbContext. This fixes script threads