media-keys: Merge keyboard/screen brightness code paths

A lot of duplicated code here.

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