Added an API to control database-level autocommit.
Separated autocommit and isolation level handling for PostgreSQL.

Autocommit cannot be manipulated independently from an open connection.
This commit introduces a minor change in behavior: entering transaction
management forces opening a databasse connection. This shouldn't be
backwards incompatible in any practical use case.
Enabled autocommit for PostgreSQL.

For users who didn't activate autocommit in their database options, this
is backwards-incompatible in "non-managed" aka "auto" transaction state.
This state now uses database-level autocommit instead of ORM-level
autocommit.

Also removed the uses_autocommit feature which lost its purpose.
Stopped flipping the uses_savepoints feature at runtime.
Expressed the dirty flag handling logic in terms of autocommit.
Added BaseDatabaseWrapper.ensure_connection.

This API is useful because autocommit cannot be managed without an open
connection.
Removed _enter/_leave_transaction_management.

The goal is to make all databases share a common, autocommit-based,
implementation.
Enabled database-level autocommit for all backends.

This has the same backwards-incompatibility consequences as those
described for PostgreSQL in the previous email.
Deprecated transaction.commit/rollback_unless_managed.

Since "unless managed" now means "if database-level autocommit",
committing or rolling back doesn't have any effect.

Restored transactional integrity in a few places that relied on
automatically-started transactions with a transitory API.
Documented database-level autocommit.
Deprecated transaction.is_managed().

It's synchronized with the autocommit flag.
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.

Technically speaking they aren't usable yet.
Implemented an 'atomic' decorator and context manager.

Currently it only works in autocommit mode.

Based on @xact by Christophe Pettus.
Made atomic usable inside the legacy transaction management.
Added some assertions to enforce the atomicity of atomic.
Deprecated the old transaction management APIs.
Removed superfluous code now that connections use autocommit by default.
Made atomic work even before the first SQL query.

Thanks Florian for reporting this bug.