Wrap usage of feature reader and writer in a try/finally section, do not take chances about closing them
[GEOS-6747] Fixed wfs outputformat encoding in layer preview