BUG/TST: Fix io.sql.write_frame replace bug and complete test coverage of if_exists functionality
This fixes #2971 and #4110.  This also provides test coverage for the different values for the if_exists argument for io.sql.write_frame.

related to #4163
 Rebased and added test coverage for mysql flavor
 @hayd you have this included in SQL ?
 @jreback thanks, I'd missed this. Will squish and add in to legacy and sqlalchemy.
 @hayd just keeping it on the radar
 #2971 is about pandas dropping tables and losing data. That's... not cool.
We should get it fixed for 0.14, regardless of #5950. 

@hayd, we pushed 0.13.1 to next week, can you give a push on this for 0.13.1
by any chance?
 squished and rebased this branch, will see if it passes/what needs fixing. Agree this was bad, apologies on dropping the ball here. Should make sure this is also fixed in the new stuff.
 @jorisvandenbossche  @hayd should this be incorporated / closed 
does it fit the new schema? 
 This PR was rebased by @hayd in #6164 and this PR is merged, so closing.
