Rework keys validation procedure. Fix Bug#1032590.
key-validate: review fixes

- introduce primary_key_validate
- make asserts follow the coding style
- the original patch introduced a regression
in the error message when using a multi-part
key in update/delete: since, in the original patch,
key_validate was invoked before primary-key validation,
the error message changed to a less suitable one. Remove
this.
- an assert that something is not NULL is useless noise,
since a few lines down there's definitely going to be
NULL pointer dereference.