Implement a 'getopt_long'-style interface. Use in 'expand-js-template.js'.

The behavior is similar to 'getopt_long' with
- 'optstring' param starting with '-:',
- 'opterr' set to 0, and
- 'optind' set to 2

See 'man 3 getopt' for details.

'argv' is not permuted. No errors are printed. For code simplicity,
'-o' and '--o' are considered equivalent. Abbreviations implemented.
'--' not implemented for now (easily done in user code).