JSON format option id_policy (GEOS-6314)

See http://jira.codehaus.org/browse/GEOS-6314

This pull request includes test case and documentation (and should be in position to be cherry-picked back to stable).