performance improvment for MigrationVersion.compareTo

move logic of parsing to construction phase and make some reusing of
cached patterns
Merge pull request #564 from pwielgolaski/master

performance improvement for MigrationVersion.compareTo