[1.7.x] Fixed #23880 -- Added missing index_together handling for SQLite

Backport of d2202ec2d4d0477b682c6d0051f27ab4843ef89f from master
[1.7.x] Fixed flake8 warnings.

Backport of 392e11945fa246d751d23bb515703fcaf55dfa26 from master
[1.7.x] Fixed selenium test failure of JavascriptI18nTests.

The failure was introduced in dd1ea70779adff294140eddb0229c382e12f32f3.
The tests wouldn't start due to a "Dependency on unknown app" error.

Backport of b8cc5f3cd4c70518dceb894edf9717abff79f0b4 from master