Initial set of changes to build and pass tests on Xcode 6 beta 3. Primary issue is a bug where two protocols that refer to each other crashes LLVM. TokenizationState turned into a class to avoid this. I may retain this pattern regardless (making tokenisation state behave essentially like branch and making branch a convince class.