fix wrong memcmp() usage in CKey::operator==

- add a check for CKey::size() of a and b (size can be 0 or 32)
- change the fixed value in memcmp() to use a.size() instead
- fixes #3090
Merge pull request #3176 from Diapolo/key

fix wrong memcmp() usage in CKey::operator==