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 from wip/hughsie/packagekit-thread-safety in 4 minutes and 20 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #213081
build-gnome-software

00:04:20