refactor: simplify std.string.require_version.

* lib/std/string.lua (version_to_list, module_version): Factored
out of require_version, rather than defining new temporary local
functions on each invocation of require_version.
(require_version): Simplify accordingly.

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