Fix deadlock when invoking xsel on single-threaded display manager in NativeLib.cs

Single-threaded display managers (like Cinnamon) can be deadlocked by a Mono window
ceasing to process window messages. One such dead-lock is possible with xsel when invoked
by KeePass. This patch fixes the problem by having KeePass wait for xsel to exit on a thread,
allowing it to continue processing messages.

This should be a safe fix, since the function call has already acquired the output from KeePass
before blocking for it to exit.