Better handling of id filters.

- Fixing encoding issue with PostGIS
- Make GeoJSON return sequential/reliable identifiers when id is absent
- Updated VectorApiTestBase to add some tests for id handling