Redmine/6553: Fix implicit looping over multiple lists

Pull request for initial review of the changes to the code. Planning to add more test coverage to the acceptance test before merging.
Every caller calls this function in the form `entry && RlistTipIsNull(entry)`, which is an argument for moving the NULL-check here instead.  Of course, that would mean returning false on a NULL entry, so the right name for the function is then `RlistEntryIsCfNull`, which would make it clearer, in code calling it, that what we're checking against is cf_null entries, not NULL ones (at the possibly distant tip of a list accessed via this entry).

Having said which, your strcmp() here would be in deep trouble if val.item were NULL.  It's possible something somewhere is ensuring that there are no such entries - ISTR seeing code doing roughly that - but checking for it here would obviate the need for turning NULL entries into cf_null ones.