Import action keymap into input manager upon start

import unmapped actions into input manager, too.
Add main actions idents to the main input_context

Use look_up_action to translate the action idents returned by the input context to the action_id.
Add special case form movement keys as they use global actions.
Add input_manager::get_previously_pressed_key to get the last key pressed.

This will be used in the butcher menu as hotkey for the first corpse instead of looking up the key used for the butcher action.
Use a function the get main input_context:

The input context contains a display_help function that displays the keybindings and allows changing them, That function is used in help.cpp for displaying and changing them.

Remove unbound_keymap from header as it is only used in a single cpp file
Move load_keyboard_settings into initialization of input_manager,

Make the keymap private to action.cpp, not used in any other file.
To allow the input_manager to take over any existing settings, copy the loaded a keymap into the reference parameter.
Remove saving the keymap when loading from legacy location
remove keymap functions that are no longer used
move global press_x to input_context

make the global press_x use the default input context instead of the keymap
remove a unused press_x function
Change action_from_key to use the input_context instead of the keymap
make get_direction use action_from_key instead of the keymap
change keys_bound_to to use input_context instead of keymap

Added a wrapper function to input_context to get the keys used to trigger an action.
Allow action in the input_context to have differing names.

Because the keys that move the player character are also used to move the center of the overmap maybe somewhere else, too.
They should be labeled as "move north" and "pan north" respectively.
finalize importing old keymap file:

Omit saving the default keymap if the keymap file does not exist.
delete imported keymap after saving the imported bindings.
Move keybindings for movement out of the default keymap

Use canonical action names (uppercase) for movement as they already exist
in the keybindings file.

Change look_up_action to accept both versions (old (lowercase) version
is needed to load old keymap).

Change action_ident to return the new (uppercase) version of the action
ident.

Add F1 to the "Display help" keybinding, some dialog use '?' for their
own actions so this makes the keybindings help available there, too.
Don't load default keymap:

When loading the old keymap, don't load the default keymap. Instead load only the stored keymap (if existing), or nothing if no keymap file exists.
The default keybindings will be put into the keybindings.json file.

Combine the two load_keyboard_settings functions, gets rid of the function that basically was a wrapper.
Also get rid of the global variable keymap, default_keymap and unbound_keymap. Instead use reference parameters.
Erase eventually existing default bindings when loading old bindings from keymap.

Move loop that creates the default action and stores their names in the
input manager before the loading of the legacy keymap.
Move the default main keybindings to json

Removes the default_keymap_txt function as its content is now entirely in json.

The action names are moved to json, too. This allows the removal of the action_name function.
The functionality of that function can be emulated by
get_default_mode_input_context().get_action_name(action_ident(name))
This is done in the macro in handle_action_menu.

Also change the call to action_name in get_default_mode_input_context to the string that the function originally would return.
This only applies to the few actions that are taken from the global context because they have different names in the global context, which have to be overridden for the main context.
Use input_context in choose_direction and similar.

Also compress choose_adjacent_highlight, most of it is already done in choose_adjacent.
Use input_context in editmap.cpp

Use the sequence "timeout(BLINK_SPEED);handle_input();timeout(-1);" all the time, instead of avoid reseting the timeout at the end of the loop.

More documentation for input_context::get_direction
veh_interact: move the call to cant_do and initial display_mode into the do_* functions

Ideally the cant_do function would be split and the parts put into the appropriate do_* function.
Use input_context in veh_interact

first part: use context in do_main_loop