[duim,gtk] Add clipboard support

At the moment it can only set the content of the clipboard because calling
the gtk-clipboard-wait-* functions blocks the program.