New file qw_thr.c.

This file contains platform-independent (but only pthreads for now)
mutex code. A mutex has been added to qw_edit_t as well and used
from qw_edit_paint().
New function qw_thread().
New functions qw_drv_exec() and qw_drv_paint().

These functions init and use the mutex inside the driver.
Limited mutex use in qw_edit_paint().