Update emulator to support Mike's data format

I (Max) was using node indices, as in integers in string format, as the
values in toChar and fromChar, while Mike was using references to the
node objects themselves. The changes made in emulator.js adjust for
this fact, by finding the index element of the node and converting it
to a string. A change was made to emulator_test_data.js so that graph1
has a reference to the starting node. Note that the test data doesn’t
work right now because of the changes mentioned at the beginning of
this commit.