core: Fold duplicated code from _gpgrt_argparse.
* src/argparse.c (_gpgrt_argparse): Fold common code.