some changes to layout.py
WIP-MEI: Modularize the convertFromString() "preprocessing" functionality

Previously all this "preprocessing" functionality (which in effect constitutes
the first pass of a two-pass importer) was all held in the same function,
which made proper testing impossible. With this modularization into an ensemble
of helper functions, I'll be able to test properly, which will be a big help
especially for the complicated elements like <tupletSpan>.
Merge branch 'master' into mei