add when_failed, when_changed, and extended when_set/unset

This commit extends the 'when_' conditions to failed and changed
json results

Additionally it makes when_{set,unset,failed,changed,int,str,flt}
behave more similiarily in that they all except and/or/not logic
Merge pull request #1811 from fdavis/devel

add when_{failed,changed}, and extended when_{set,unset}