ENH/TST: Raise error if invalid value passed to if_exists argument

The if_exists argument in io.sql.write_frame needed data validation
because the logic of the function implicitly used 'append' if the argument
value was any string that was not either 'fail' or 'replace'.
I added a new unit test to support the requirement.
BUG: Fix if_exists='replace' functionality in io.sql.write_frame

This should resolve issues #2971 and #4110
CLN: Refactor in between test clean ups to be more DRY
TST: Complete test coverage for if_exists uses in io.sql.write_frame
CLN: Refactor to make interaction between exists and if_exists clearer

This refactor results in the function logic being clearer, since if_exists is
only relevant when exists is True, the program flow is better served to
have if_exists control flow only when exists is True
BUG: Fix regression introduced by c28f11a0041a9f3b25f33b0539e42fa802b1d8d4

sqlite3 convenience function executescript not available
in other database flavors.