Make sure property of nodesIndex is not a function in addNode and check for edge size when processing edges

I had a problem rendering a sigma graph in FireFox because a node id had the value *watch*, which is an [Object method implemented in Gecko only](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch).

In FireFox `if (self.nodesIndex[id])` was true in this case and an exception was thrown. To get around this I added a check to make sure the type of the checked property is not *function*.

Moreover, I fixed an issue in the gexf2Json plugin. The actual edge size was only correctly assigned when a previously set node object had the size attribute set.

Sorry for mixing 2 different things into one pull requested, but I noticed the gexf2Json error only accidentally after I noticed that merging the upstream repo retained one of my previous changes that wasn't needed any more.