specl: use optparse for command line option parsing.

Make a start at replacing the current ad-hoc option parsing
code with a more civilised module.
* specs/optparse_specl.yaml: Write examples for the API we'd
like to have.
* specs/specs.mk (specl_SPECS): Add specs/optparse_specl.yaml.
* specl/optparse.lua: New file, an option parser with a more
civilised API.
* specl/specl.mk (nobase_dist_lua_DATA): Add specl/optparse.lua.
* src/specl.in: Use OptionParser instead of process_args.
* specl/util.lua (warn, process_args): Remove.
* specl/version.lua.in: Remove.
* configure.ac (AC_CONFIG_FILES): Remove specl/version.lua.
* local.mk (install_edit): Add various equivalent @PACKAGE@ etc.
substitutions.
(inplace_edit): Remove, it's a duplicate of $(install_edit).
* src/src.mk (specl_inplace_edit): Start with $(install_edit).
(docs/specl.1): Remove specl/version.lua dependency.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
specl: extract rather than hardcode default option specs.

* specl/optparse.lua (set_handler): Diagnose multiple handlers.
(new): Loop over option specification lines in the parsed help
text, and set up default option handlers to match.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
specl: much improved optparse specs, prompting some bug fixes.

* specs/optparse_spec.yaml: Many, many more examples.
* specl/optparse.lua (normalise): Don't add a phantom '-' to the
end of split short options.
(finished): Add to unrecognised list options *after* the '--' that
got us here.
(opterr): Add a missing period to the end of passed error message
if necessary.
(parse): Make unrecognised list an instance variable so that it
can be augmented in `finished`.
(M.new): Capture and handle `--` first, as it is a substring of
long options and might match twice otherwise.
Accept a comma after a long option to allow multiple spellings of
a long option on the same line.
Consume only one `-` prefixed word per iteration to ensure the
handler patterns are compared against each one.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>