Add mutexes to protect access to PkClient and PkTask

This fixes the GUI hanging in an unresponsive state. The libpackagekit-glib
library isn't as thread safe as we'd like, and although we can fix PK to be
safer we can't depend on that very new version just yet.
1 job for <span class="ref-name">wip/hughsie/packagekit-thread-safety</span> in 4 minutes and 20 seconds (queued for 2 seconds)
Status Job ID Name Coverage
passed #213081