Fixing update issues when primary key not first column, GEOT-4746.

Also fixes some null geometry encoding issues in H2 and SpatiaLite.