fix parameter validation

we got the parameter validation code wrong. this PR fixes the validation and adds some tests for the error conditions.

there is a slight BC break here, in that we previously ignored unknown parameters and now detect them.

what is really user unfriendly is that the PHPCR spec says to return null if the parameters are not known. an exception would be a lot more helpful. i am tempted to violate the api doc and throw an exception.