cleaned up commonjs to allow use of activity global.

fixed require impl to allow "activity" global to be visible
to scripts loaded via require module loader. also moved alert
function into "io" module for now.