DATAJPA-606 - Improve handling of empty arrays and collections in query parameters.

We now replace an empty collection or array with null as surrogate value.
This allows empty collections / arrays to be passed to repository methods.
This works with Hibernate EntityManager as well as EclipseLink. OpenJPA doesn't support using null values as surrogates for empty collections yet.

I filed https://issues.apache.org/jira/browse/OPENJPA-2544 to track this.