Code reorganization

Achieves a better division between grammar, learning, and data. Should
make it easier for people to experiment with different grammars and
train/test data.
Improved README text