token, kex: Add functions to handle tokens lists
The added functions allow splitting chains of tokens separated by a
given character (usually ','), and extracting matching parts between two
chains of tokens.
The previously existing functions in kex.c were replaced by the
Signed-off-by: Anderson Toshiyuki Sasaki <email@example.com>
Reviewed-by: Jakub Jelen <firstname.lastname@example.org>