scconf: Avoid adding list into non-list item
scconf: Avoid adding list into non-list item

Issue found by calling scconf_string_parse()
with "name =\n\n\nvalue,value;" as an input string.

scconf_parse_token() interprets more newline characters as item
with type SCCONF_ITEM_TYPE_COMMENT. After that when parsing
TOKEN_TYPE_STRING, if parser->state is STATE_VALUE,
scconf_list_add() adds list into that item.
During freeing scconf_context structure, above described
item is freed as SCCONF_ITEM_TYPE_COMMENT and created list
causes memory leak.
To fix this, scconf_parse_token() checks type of item before
adding into list.

When parsing is done, scconf_parse_reset_state() frees values
in parser->name and parser->key.

fabled/OpenSC,metsma/OpenSC,fabled/OpenSC,LudovicRousseau/OpenSC,mouse07410/OpenSC,LudovicRousseau/OpenSC,dengert/OpenSC,philipWendland/OpenSC,fabled/OpenSC,LudovicRousseau/OpenSC,mouse07410/OpenSC,OpenSC/OpenSC,metsma/OpenSC,dengert/OpenSC,philipWendland/OpenSC,mouse07410/OpenSC,fabled/OpenSC,philipWendland/OpenSC,dengert/OpenSC,OpenSC/OpenSC,OpenSC/OpenSC,metsma/OpenSC