[1058534] Alert template for Trait Change from older RHQ results in NullPointerException
The "Changes" operator requires slightly different logic as alertConditionValue allows null
Add null handling, also refactor some similarly verbose/confusing code
in a few CacheElement classes. And add i-test for this issue.