Add gimp_gradient_editor_get_selection() and set_selection() and use them in gradient-editor-commands.c