Add a data structure keeping n unique last-recently-used items

This is similar to the LinkedHashMap structure, except that an
already-existing item can be easily put to the front of the list, or the
back.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a history class for the upcoming script interpreters

The newly-introduced History class maintains the history of most recently
executed statements and has functionality to persist and retrieve the list
from the preferences.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add the UI-agnostic part of the script interpreters

The newly-introduced ScriptInterpreter class provides all the
functionality of a script interpreter sans the graphical user interface.
It can execute statements and persists a history of most recently
executed statements.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let LastRecentlyUsed implement the full Collection contract

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Test LastRecentlyUsed#remove(Object)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ScriptInterpreter: remove irrelevant modifiers
DefaultScriptInterpreter: remove redundant javadoc
DefaultScriptInterpreter: add final keywords
ScriptInterpreter: add missing punctuation
ScriptInterpreter: remember the associated language

It simplifies things downstream to be able to query the associated
ScriptLanguage later, since it is known at construction time anyway.

This does *not* persist the most recently used interpreter language!
DefaultScriptInterpreter: add more final keywords
Script Interpreter: keep a record of a 'current command'

The 'current command' is the command that is not yet in the history. It
is very convenient to be able to go back in history, just to have a
look, before continuing to craft the current command (and it would be
annoying if it was lost when going back in history). Of course, if the
user decides to execute a different command from the history instead,
the edits to the 'current command' are lost.

This behavior is most in line with the Unix shell behavior power users
might be used to.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>