add class method GEXFWriter.alter_graph_mode_timeformat

extract graph mode and timeformat manipulations to a class method 'GEXFWriter.alter_graph_mode_timeformat', and fix some bugs found in the previous version
Merge pull request #1005 from ycysuk/master

add class method GEXFWriter.alter_graph_mode_timeformat