Fix null pointer error when enabling postgis shared datasource due to mi...

...ssing primary key in spatial feature and remove duplicate "Expose Primary Keys" option in postgis alternate datasource