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
Here, `_ensure_object` used, in the new `_get_notnull_col_dtype` not. But I am not sure about the reason. @jreback Is it needed to use `_ensure_object` before using `lib.infer_dtype`?