refactor: upgrade OptionParser implementation to a std.object.

* lib/std/optparse.lua (OptionParser): Reimplement as a std.object,
and simplify accordingly.

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