private: Use threading primitives correctly in private test

We shouldn't be clearing statically allocated mutexes, and also
don't use deprecated heap-allocated GPrivate.

https://bugzilla.gnome.org/show_bug.cgi?id=711755