Add support for multiple charset definitions

vt100 has support for two defined charset, G0 and G1. Each charset
can be defined, but in each moment is selected only one of both
charset. This is usually used selecting a national charset in G0
and graphic charset in G1, so you can switch between graphic
charset and text charset without losing the national charset
already defined.

st hasn't support for national charsets, because it is an utf8
based terminal emulator, but it has support for graphic
charset because it is heavily used, but it only supports G0,
without understanding G1 selection sequences, which causes some
programs in some moments can print some garbage in the screen.

This patch adds a fake support for multiple charset definitions,
where we only support graphic charset and us-ascii charset, but
we allow more of one charset definition.

This patch allow define G0 until G3 charsets, but only accepts
select G0 or G1, and it accepts some national charset definitions
but all of them are mapped to us-ascii.
Simplify Mod1 logic in kpress(), eliminating locals and a memcpy.
Avoid buffer overrun in kpress() and remove limit on shortcut strings.
New ttysend() function calls ttywrite() and techo(). Honor MODE_ECHO when pasting in selnotify().
Avoid buffer overrun in bpress()

Use correct type for Mousekey.b (XButtonEvent.button).
Ignore numlock (Mod2Mask) for button events too.

Conflicts:
	config.def.h
	st.c
Fixed lock up when system time jumps backwards

Signed-off-by: Christoph Lohmann <20h@r-36.net>
Merge remote-tracking branch 'origin/master' into omaster
Simplify logic in match().
Simplify logic in kmap().
add _NET_WM_NAME
Use int instead of long for color

This patch replaces long by int32_t. It saves
some memory on 64bit systems.
Fix stupid bug in tdefcolor returning -1 in unsigned function

k0ga misktook applying patch of others. Sorry guys!!!!
Add stdint include

Since st is using now int32_t and uint32_t the inclusion of
stdint or inttype is mandatory, because in other case the
definition of these new types will not be known by the
compiler.
Fix rmul definition

rmul means "exit underline mode", so a full reset of all
the attributes is not the correct way of exiting from
underline mode, because it is going to modify also another
attributes not related.
Set _NET_WM_PID attribute
Fix definition of F28 key.

Shitf modifier adds 12 to the function number of the function keys,
while Control adds 24, so Control + F4 generates F28
Fix comments in config.def.h to match field names.
Replace alignment tabs with spaces.
Prevent resizing stdin

This fixes a bug that the parent tty gets resized whenever you launch
st through command line.

The problem was that ioctl was resizing cmdfd before it gets
initialized in ttynew. Since cmdfd is a global variable, its initial
value is 0, and consequently stdin was being resized.