Add isBrowser and isWebWorker variables
Wrap browser specific code in if-else block
Implement web worker support.

1. Get `loaderDir` from `Error.stack`
2. Use `importScripts` to load script
Fix name collision
Add test for web worker
Improve robustness when handling stack trace
Fix typo
Merge pull request #1279 from akfish/feature/WebWorkerSupport

Add web worker support
re-exact util-cs
only use if(isWebWorker)
make sure isWebWorker by isFunction(importScripts)