Some pruning bugs

This pull request solves two bugs involving the pruning process while traversing graphs.

* Now arbitrary Javascript code can be added in the stop parameter of the traverse function.
* Solved a bug involving the traverse process with the neo4j.py syntax.