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.
Made transaction management work even before the first SQL query.

Thanks Florian again.
Documented how atomic behaves in managed mode.

Thanks Florian once again.
Deprecated TransactionMiddleware and TRANSACTIONS_MANAGED.

Replaced them with per-database options, for proper multi-db support.

Also toned down the recommendation to tie transactions to HTTP requests.
Thanks Jeremy for sharing his experience.
Implemented atomic_if_autocommit.

This cannot be used right now, but it'll be useful in 1.8.
Fixed the documentation for savepoints.

Apparently django.db.transaction used to be an object.
Re-ordered functions by deprecation status.
Updated the documentation for savepoints.
Added an explanation of transactions and grouped low-level APIs.