shl: add shl_read_file() helper

This reads in a complete file as a string and returns it to the caller.
The string is 0 terminated (which isn't guaranteed by mmap()) so this
helper is needed if we have to work with APIs that don't accept buffer
lengths.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
kmscon: add --xkb-keymap option for predefined keymaps

This adds an --xkb-keymap <FILE> option to kmscon. When given, kmscon
will try to compile the keymap from the file before trying the other
options (like the XkbKeymap option in xorg.conf).

This is useful for users who have a customized XKB keymap, which is
usually kept in a single file. Example, in X:
	xkbcomp $DISPLAY my_keymap.xkb
Customize my_keymap.xkb to your liking, and then in .xinitrc, or
xorg.conf:
	xkbcomp my_keymap.xkb $DISPLAY
Now you can also do this in kmscon.conf.

Additionally, lacking such an option, kmscon is quite difficult to use
without an installed xkeyboard-config package, which provides the
infrastructure for the "rules" configuration mechanism. We might even
want to distribute some plain xkb file as a last ditch, for
robustness, if even the default RMLVO fails... without a keyboard a
terminal is not very useful.

(changed Ran's patch to use *_from_string() instead of *_from_file())
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
docs: man: document configuration files in kmscon(1)

This moves the description of kmscon.conf to a separate "Configuration"
section and adds some example kmscon.conf configuration lines.

This addresses #71 (at least, with this change in place I probably would
not have been momentarily confused by the exact syntax used in
kmsconf.conf).

(removed trailing whitespaces)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>