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

- also change a fixed value in memcmp() to use CKey::size() instead
- fixes #3090