Moved test.js into res/lib
Added sys.runtimeConfig and core.devMode,core.testMode,core.debugMode