Add line terminators to ends of line graphs

https://www.pivotaltracker.com/s/projects/911874/stories/74931512

It's not 100% obvious *exactly* what the requirements in the ticket are, but I think I've got them about right.

Also adds a bunch of tests for line terminator behaviour.