ENH: Infer dtype from non-nulls when pushing to SQL

This infers dtype from non-null values for insertion into SQL database.  See #8778 .  I had to alter @tiagoantao test a bit.

Like @tiagoantao, I skipped writing tests for legacy MySQL. Support for this will be removed soon, right?

As a side note, `lib.infer_dtype` throws an exception for categorical data -- probably shouldn't happen, right?

@jorisvandenbossche 
@jahfet
@tiagoantao
I mean the error that is raised when having complex types. I think that is a new addition?

That is certainly OK! But I just meant that we should maybe add a test that the error is raised. And also add the same thing in the sqlalchemy mode.