Fixed #10164 -- Made AutoField increase monotonically on SQLite

Import patch, add test and documentation.

https://code.djangoproject.com/ticket/10164