Added chunksize argument to to_sql
Large dataframes may fail to write to a database in one go due to packet size errors .  This add a `chunksize` parameter which will write the dataframe to the database in batches.  See https://github.com/pydata/pandas/issues/7347 .

Notice that there is quite a bit of code duplication between the SQLAlchemy and legacy APIs. This could be factored out if desired at the cost of a few private methods.

Closes #7347

Thanks for the PR! Looking good at first sight, will try to do a more detailed review tomorrow.
 Just something to consider --- it might be better to strip out the transaction handling code and just document the fact that batch writing is non-atomic.  It seems like sqlite, at least, does not support transactions for DDL statements like `CREATE TABLE ...` , so the transaction code adds cruft but does not fulfill its intended purpose.
 @jorisvandenbossche thanks for the comments, I implemented the suggested fixes.  The reason for using Session() was some weirdness with sqlalchemy 0.7 (specifically, Engine does not support contextmanager), but now I got around it using only low-level elements.
 About the version, if you need a newer version for something, we always can consider setting a higher minimum required version. In any case, we will have to raise the bar to 0.7.4 to support schema's.

For the PR, added two comments. Looking good for the rest! And further:
- needs a whatsnew entry (in enhancements)
- can you add also a small section in the docs? (in the "Writing DataFrames" section (http://pandas.pydata.org/pandas-docs/stable/io.html#writing-dataframes)) For example add in short something like "If you the connection times out, you can solve this by using the chunksize .."
- squash the commits

Thanks a lot!
 Let me know regarding changing sqlalchemy required version vs. leaving transaction code as-is and I will make changes if needed and then squash the commits.  Thanks greatly!
 apart form the formatting comments, and the one comment above on `keys` (https://github.com/pydata/pandas/pull/8062#discussion_r16560233), I think this is ready to squash and merge

@danielballan @hayd @mangecoeur of someone else wants to give this a look, certainly welcome
 Removed keys (good catch), fixed doc changes, and squashed the commits.
 Thanks a lot!
