RFC position code

This is a stab at the position code. Any feedback welcome.

I need to at least clean it up and add more tests. Just want to make sure it's going down the right track.
There's a natural lexicographic ordering in scala - somewhere. Miles showed me the other day - I'll dig it out.