add runtime.exit() api, improve terminal and shell
runtime.exit() return paramater added, other improvements