accels: Consolidate code to edit and clear shortcuts

https://bugzilla.gnome.org/show_bug.cgi?id=728121