cypher performance enhancements

rewrote pathimpl
replaced Iterator() with Iterator.empty
replaced List() with List.empty
replaced Seq() with Nil
replaced seq.size with alternative predicates