Fixed incorrect datatype conversion on multi-indexes

When creating a new table from a `pandas` dataframe with a multi-index, the code would iterate over the index columns backwards but use their types as if counting forwards.  This meant that the created table had incorrect indexes for multi-indexes.

This code factors out a function to pull column names and column types for both SQLAlchemy and legacy table objects.  This code now iterates over the indices properly.

And additional test has been written.  All test pass on my local machine.

Closes https://github.com/pydata/pandas/issues/8021 .
You are right -- this is a weird place to put the test.  However, I decided to go this way because of two reasons:
1) I first tried the writing then reading back route.  To my surprise, sqllite does not enforce type constraints (http://www.sqlite.org/faq.html#q3).  So, for example, inserting a float into an int-defined field does not convert it into an int, and when read back, it comes back as float.  So we need to check the actually schema definition made by pandas.
2) This bug also showed up in the legacy (non-SQLAlchemy) table creation code, i.e. `PandasSQLTableLegacy.insert_statement` and ideally that would be tested also.  If we could rely on writing/reading back it could be, but since not we have to parse the SQL string returned by that method -- and this seems too brittle.  So I did not test it.
Definitely would be open to suggestion of where to move the test while satisfying these constraints.
Also thanks for the point regarding `assertTrue` -- fixed now.