Merge code from Selector into BrowseDialog

Adding features to the selectors would have meant copy-pasting code.
This merging of code is intended to prepare the codebase for further
improvements.

This commit introduces more overridable functions for functionality
that differs per subclass, but only Selector is modified to use them.
Functions are provided to paint the background and icon required by
file selectors (useful for selecting wallpapers or previewable files)
and to initialise the path (for the wallpaper dialog, that would not
set the path at all, and instead merge from 4 wallpaper directories),
the display (row height, visible rows etc.) and the initial selection
(which is intended to be overridden by Selector to preserve its last
selection).

The behavior is intentionally kept similar, but due to the merge, there
are some differences:
* Selector now has an up-arrow icon next to the ".." entry, which
  selects the parent directory. Previously ".." was just text, which
  does not clearly indicate to a newbie that ".." goes to the parent.
* Selector now has a generic icon next to files, if directories are
  also shown. Previously there was no icon. This causes a slight loss
  of space for the file name.
* Selector now shows file extensions, when it didn't before.
* BrowseDialog and subclasses now have no big chunk of empty space at
  the bottom of the content area if only a partial row would fit there.
  The space is now redistributed to each row, as much as possible.
  This comes from Selector.
* FileDialog, used by the Explorer link, can now show the entries of
  the root directory properly. Previously, they would be displayed
  empty and possibly crash when selected.
* Selector now uses the same button as BrowseDialog and subclasses
  to cancel the entire dialog.
* The new virtual function to fill the ButtonBox runs per file. This
  allows for the text prompts to adjust to the context.
* BrowseDialog and subclasses now attempt to get an existing directory
  by removing path components at the end if the initial path doesn't
  exist, but only if directories are shown. If they are hidden, this
  path resolution is inhibited to act more like a pseudo-chroot, and
  "(no items)" is shown instead. This comes from Selector.
* Selector does not preserve the index of the first visible entry in
  it anymore, preferring to force the selected item to be at the bottom
  of the viewport. This comes from BrowseDialog.

While this is not due to the merge, the text hints for "Select" and
"Confirm" are now "Enter" and "Select". Select and Confirm were quite
confusing becaue they meant the same thing, but "Enter" now refers to
entering a directory without selecting it, and "Select" now refers to
designating the result of the selector.

The following behavior was kept the same using a workaround:
* DirDialog still selects the directory that the user has navigated
  *into*, not the one under the cursor. To keep this behavior,
  DirDialog::canSelect returns true for any selection, including "..",
  but BrowseDialog::initButtonBox checks for the selection being ".."
  and hides the hint for the Accept button in that case.

Code-wise, BrowseDialog::setPath() always adds a slash at the end of
the path, so getPath() will always have it.
Make WallpaperDialog a subclass of BrowseDialog

The implementation of BrowseDialog is reused in WallpaperDialog,
shortening the code in WallpaperDialog and unifying button actions.
Get rid of the action on D-pad Left in BrowseDialog

There is no counterpart action for the opposite direction, D-pad Right.
Having D-pad Left trigger a return to the parent directory was
inconsistent.

Additionally, this frees up the D-pad Left and Right inputs for
something more useful.
Use the last file name selected for a LinkApp as a hint in Selector

This replaces the previous mechanism to preserve the selection, which
was very clunky.

Firstly, it only worked across a single invocation of the Selector and
the subsequent restart of gmenu2x once that application was exited.
Once the user exited the Selector, the last file selected by the user
for that application was forgotten. Now, a 'selectorfile' key in the
application's settings file remembers the name of the last file it was
launched with.

Secondly, because it preserved only the index of a file among the last
selected directory, if the application created a file whose name comes
before the last selected file, the selection would be shifted. This is
mitigated with a file-name-based hint.

Thirdly, it could not recover at all from missing directories, due to
it forcing the selection to an index which could be beyond the file
count. Now, the hint is just applied to the directory that gets used
as a fallback.
Initially select the current wallpaper in WallpaperDialog