Moves large child functions out of resourceloader's loadFromWorker

Pure refactoring, but should at least slightly increase parsing performance
Improves code organization in resourceloader.js
Merge pull request #960 from tschneidereit/master

Some resourceloader cleanup