cubicweb #2424288 is_in_state predicate does not work for entities for which bool(...) evaluate to False [validation pending]

This can be tricky if your entity type has no __nonzero__ implementation but a __len__ one which returns 0 => in this case bool(myentity) is False.

is_in_state predicate should not use this value when computing its score for the entity.

done in3.15.2
load left0.000
closed by#ff3b163f52e9 [predicates] fix predicates that erroneously evaluate the entity passed as a parameter as a boolean, instead of testing its existence in the keyword arguments -using the kwargs.get('entity') idiom instead of 'entity' in kwargs or similar- ; closes #2424288