Handle ESC -> escape translation in `input-decode-map` (fix #264)

The old ESC -> escape translation code relied on a certain handling of
the keymap code in Emacs' core. This handling has changed in Emacs
24.3 and cause bug #264 and the related Emacs bugs 13709, 13793.

The new code handles this transition not in a high-precedence minor
mode map but directly in `input-decode-map`. An incoming ESC event is
translated to either 'escape or to the default ESC prefix map
originally bound to ESC in `input-decode-map`.
Modify `input-decode-map` for each terminal (re #264)

This variable is "keyboard-local", so it is different on each
terminal. Therefore modifying in globally does not work. We need to
use frame/terminal hooks to adapt the keymap locally for each
terminal.
Modify `input-decode-map` only in tty

This keymap is terminal-local (keyboard-local) anyway, so we can leave
it unchanged in X.
Allow interception of ESC in X

The variable `evil-intercept-esc` control when `input-decode-map`
should be modified to deal with the ESC resp. C-[ event.
Merge new handling of ESC in terminal (fix #264)