gui1: Reuse an unchanged max instead of recalculating it

Counts as a minor cleanup of commit
045bda037d78056866bdd918b51708d44d2bf515.
move all gui2 lua bindings to their own file
add a null pointer check
gui1: Fix bogus dialog option buttons layout (bug #22791, #22379)

Formerly, the option buttons at the bottom of the dialog were laid out
by redoing some math instead of tracking the dialog's menu position,
which is always valid (even when there is no menu!). I'm not entirely
sure why, but the math reprised here became bogus with the introduction
of top buttons in commit 045bda037d78056866bdd918b51708d44d2bf515 (for
the Add-ons Manager dialog), in particular for dialogs *not* using them
(such as the in-game Statistics dialog), even though the menu is still
laid out correctly.

So instead of reinventing the wheel, we really should just take the
menu's position and height as a baseline for the bottom option buttons.
At worst the height is 0, but the position is still within the dialog's
boundaries (but see below for an unsolved corner case).

This commit reverts commit f60ef98e275fd3d16733f7d5dfd7314920841fd5
(a.k.a. 69521000dc5c45f9745131ee13e76493e14fefaa in 1.12) that's part of
PR #263, because it turns out that the solution proposed there is only a
convenient workaround that solves a layout issue for a single dialog
(Statistics, see bug #22379) and introduces a new bug for another
(Add-ons Manager, see bug #22791).

Regardless of the cause for #22791, the approach put forward by this
commit is more consistent with best practice (laying out widgets from
top to bottom each row's geometry depending on the previous row's), so I
have decided to not look too much into it.

It should be noted that the layout of bottom option buttons breaks
entirely for dialogs missing a menu, both before and after the
introduction of top buttons. Currently there is no GUI1 dialog that
attempts to insert option buttons while lacking menu entries, so I'm not
too concerned about this bug (which affects 1.10 too!). Besides, some
day GUI1 is supposed to go the way of the dodo and stop bothering us
with its marvelous inflexibility and arcane logic.
move gui2 dialog lua functions to the lua kernel base
Merge branch 'master' of https://github.com/wesnoth/wesnoth
move the help browser files into their own folder
split help_button out of help.hpp header
add help_impl.?pp files (guts of help.cpp)
move the help browser files into their own folder

This is the start of a refactor to make all the help code more
easy to follow.
split help_button out of help.hpp header
add help_impl.?pp files (guts of help.cpp)
split off help_browser from help_impl
split off help_text_area from help_impl
fixup headers of new files using iwyu
split off help_menu from help_impl
Revert "add help_impl.?pp files (guts of help.cpp)"

This reverts commit c1366ad9d9829ff38d71109246c9d96932f0075f.
Revert "split help_button out of help.hpp header"

This reverts commit af34dc39312e026a8c7031cc1750dfe86f9dba8b.
Revert "move the help browser files into their own folder"

This reverts commit a93a3fda2b547496eaf56a0532377a701a382c7a.
Merge branch 'move_help_browser'