Bug 731389 - gimp-edit-copy causes assertion failure on exit

Shutdown the clipboard earlier at exit, it runs quite some code on
storing the copied buffer.

(cherry picked from commit 8aa6ff9608aa497c1b394dace50c99216b1cd995)