Simplify SchemaDef.resolveAllIndexes() by doing two passes instead of a more complicated comparator and make non-fk names (even auto-generated) take precedence over fk names.
Simplify SchemaDef.resolveAllIndexes() by doing two passes instead of a more complicated comparator and make non-fk names (even auto-generated) take precedence over fk names.

Change detection of duplicate key back to throwing exception instead of an assert.

wfxiang08/sql-layer-1,jaytaylor/sql-layer,ngaut/sql-layer,qiuyesuifeng/sql-layer,shunwang/sql-layer-1,jaytaylor/sql-layer,qiuyesuifeng/sql-layer,wfxiang08/sql-layer-1,wfxiang08/sql-layer-1,shunwang/sql-layer-1,ngaut/sql-layer,jaytaylor/sql-layer,shunwang/sql-layer-1,relateiq/sql-layer,shunwang/sql-layer-1,relateiq/sql-layer,wfxiang08/sql-layer-1,relateiq/sql-layer,ngaut/sql-layer,jaytaylor/sql-layer,relateiq/sql-layer,qiuyesuifeng/sql-layer,qiuyesuifeng/sql-layer,ngaut/sql-layer