keymap: Add a xkb_keymap_num_levels() function

This allows callers to know the maximum number of shift levels of a
single key on a given keymap.

See https://bugzilla.gnome.org/show_bug.cgi?id=737134 for why we need this in mutter. Better ideas for how to implement that are very welcome. Thanks