rename to gettoken, use more widely, add a basic test.
additional tests for the parser.
move more parsing code out of config.c