Updated GML2 encode example to use List<SimpleFeature> to accumulate features

According to the feature tutorial, FeatureCollection objects should not be treated as immutable views, and so the add method was deprecated. I've updated the code to instead create a List<SimpleFeature> and then convert that list into a SimpleFeatureCollection where needed.