Move analysis to web worker

Moved all image analysis code to a web worker. This lets me cancel
analysis on an image if the user closes the image properties
pop-up before analysis is complete.