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.