Listen for single-instance invocation from mapplauncherd.

This code comes from mapplauncherd pretty much verbatim. It is not my fault, and
not my problem. I'm sorry for inflicting it upon the world further, but this is
the Qt 4/X11 branch, after all.
Merge pull request #56 from rburchell/qt4

Listen for single-instance invocation from mapplauncherd.