Musicxml fixes 2

Assorted MusicXML import bug fixes plus minor cleanup. New regression test files included.