Moved standard SQL for savepoints in the base backend.

These methods are only called when uses_savepoints = True anyway.
Refactored implementation of savepoints.

Prepared for using savepoints within transactions in autocommit mode.
Added support for savepoints in SQLite.