fix related to #972 – improve gml generator and parser to handle list attributes

Currently, write_gml and read_gml don't handle correctly list attributes – see issue #972. This push aims to fix that.

While looking at the code and the reference of the GML format i discovered a few bugs like ids that from integer become strings... The parser and generator should be rewritten for the most part imho.

Cheers, Luca