Now drawn image is saved in a background thread.
Optimized drawing memory usage. Now only keeps the minimum pixmap rectangle necessary to perform undo/redo.