First working version of paperjs with Worker detection

This PR replaces #581 
More tests are needed before it can be merged.