Refactor code in PlainStreetEdge.java and Timetable.java

This pull request builds on my previous one. I've refactored two pieces of code that are tangentially related to the reverse optimization bug.