Only send Compliance event when compliance changes

Create an MD5 hash of the key parts of compliance
and the consumer when compliance is calculated
and check it against the current hash value that
is stored on the consumer before sending compliance
events.

There is a possibility of collisions with this
approach, meaning an extra event will be sent,
but this is not a big concern.
Probs not. At best you could "save" a step by dumping your strings into a data structure that sorts them upon insertion, but that's not guaranteed to be faster and, depending on the algo, could actually be slower.

I'm guessing the double-iteration is in there because there's no guaranteed order to the various collections in a compliance (e.g. products a, b, c vs products c, a, b)?