Function to parse GEXF separated from the download part.

The parseGexf function insists that the GEXF document comes from the server. In my use-case I already had the data on the client side, ran an XSLT to get a GEXF document, which I then needed to pass to the parser.

I split the code so that it is now possible to do both. You can either download GEXF files as beforehand, or you can just pass an existing document to the new parseGexfDocument function.

Joachim