gpg: Factor some code code out of tofu.c
* g10/tofu.c (string_to_long): New. (string_to_ulong): New. (get_single_unsigned_long_cb): Replace strtol/strtoul by new function. (get_single_long_cb): Ditto. (signature_stats_collect_cb): Ditto. (get_policy): Ditto. (show_statistics): Ditto. Uese es_free instead of free.
There is one minor semantic change: We now accept "nnn.0" always. The
old code did not checked for ".0: in show_statistics.
- Signed-off-by: Werner Koch <wk@gnupg.org>