wayland-keyboard: Make update_pressed_keys() more generic

It will allow us to re-use this function next. Also rename the keys
array to pressed_keys since we'll need to add a different one.

https://bugzilla.gnome.org/show_bug.cgi?id=727178
wayland-keyboard: Send keymap events also to focused resources

We move focused resources out of the global list when we focus a
client's surface so we need to send events for those separately.
wayland-keyboard: Send modifiers after the keymap

Clients have to re-create their modifier state when getting a new
keymap so modifiers have to be sent after the keymap, not before.