UTFGRID: implement escaping of item and data values
Fixing a large number of programming errors found by static analysis

issues found by the coverity scanner, most are memory leaks on error
conditions.
Merge branch 'branch-6-4' into master-coverity

Conflicts:
	mapagg.cpp
	mapcontext.c
	mapdraw.c
	mapfile.c
	mapgd.c
	mapgml.c
	maplabel.c
	maplegend.c
	mapogcfilter.c
	mapoutput.c
	mappostgis.c
	maprendering.c
	mapwfs.c
	mapwfs11.c
	msautotest
fixups after coverity merge
Require Validation of SLD ExternalGraphic OnlineResource (#4883)

Onlineresource must validate against "sld_external_graphic" entry of
map->web->validation in order to be taken into account.

added thanks to Regione Toscana - SITA