core: fix problem in handling select statement / ORing state lists
This introduces filter_slist() which I will probably want later on.
This problem showed up in a select statement. I don't know if it affects
anything else.
The cond_true and cond_false lists are only supposed to include the
states which have been set. But when we OR the cond_true and cond_false
states we have to take the pre conditions into account. Otherwise if a
state has been set in cond false and in the pre cond list but not in the
cond true list we get a merge with "undefined".
The problem is that when we get done, we don't want those pre condition
states to still be around. So we filter them out.
Signed-off-by: Dan Carpenter <error27@gmail.com>