Refactor spapp js; Begin plumbing for web workers

Moved relevant functions from spapp.js out to spapp.controls.js and
pm.spapp.utils.js.
Implemented plumbing for web workers;
- planning on moving processor heavy, UI thread hanging processes out to
web worker as much as possible, beginning with de-duplicator.