Fixed threading issues.

* PrinterThread now extends Thread.
* canPrint now checks isPrinting as well as queue capacity.
* doPrint now blocks as soon as the queues are full.