Bug 873934: uplift auto-correct patches from master to v1-train

Revert "Merge pull request #9971 from es92/bug-851565-keyboard-suggestion-capitalization-fix"

This reverts commit 37d7a218f06629b9e1dee6d3ce4d6a8276d84ae0, reversing
changes made to eea34495a4610d1b00d333e64586202bc6d488b5.

Revert "Merge pull request #9183 from evelynhung/issue-861108-v1.0.1"

This reverts commit 21ff040abc73842b1304790b574a7fceea270451.

Merge pull request #9052 from davidflanagan/autocorrect

Bug 860462 - enable keyboard auto-correction r=gwagner(cherry picked from commit 132c5a712ec4d4e92208ba4fc65ca98b8be00b31)

Conflicts:

	apps/keyboard/style/keyboard.css

Merge pull request #9124 from ckerschb/docu2

Bug 858158 (final) - [keyboard] document prediction algorithm and make it tuneable(cherry picked from commit d83b55803088a2b0a447a3282ead603f625ea9ff)

Merge pull request #9421 from davidflanagan/bug797171

Bug 797171: revert user-selected suggested words on backspace r=anygregor(cherry picked from commit 23ed3304a4123a1b177ebd9a802870feebdeb501)

Merge pull request #9422 from davidflanagan/bug861113

Bug 861113: correctly define uppercase for non Latin-1 letters(cherry picked from commit 58665c2e62206c59356e1a4c040fa81251294e55)

Merge pull request #9153 from davidflanagan/bug860624

Bug 865484 - refactor dictionary data structure and search algorithm for keyboard auto-correct r=anygregor r=ckerschb
(cherry picked from commit 413482d038560cb4065d4866013c15c64730bdfe)

Merge pull request #9610 from davidflanagan/autocorrect-visuals

Bug 868819: modify auto-correct UX and visuals(cherry picked from commit 9fa85e6ec186f865810a7ad1a4805fd37689c6d0)

Conflicts:

	apps/keyboard/style/keyboard.css

Merge pull request #10038 from comoyo/keyboard_no_autocorrect

Bug 876658 - Dont perform autocorrect if old & new word are the same. r=rudyl(cherry picked from commit bebcb40d4fe8539674f166ab057e93c9a19c1751)

Merge pull request #10155 from davidflanagan/bug876891

Bugs 878387, 878168, 876891: fix three closely related auto-correct bugs. r=janjongboom(cherry picked from commit 6ca1a9b1f327047697ab409e7e13bccd1d0a887a)

Merge pull request #10154 from davidflanagan/bug873223

Bug 873223: make long suggestions fit, increase font size, fix justification r=RudyLu(cherry picked from commit 417e5e24b7a617fdb01de10341c78b1214fdf5c8)

Conflicts:

	apps/keyboard/style/keyboard.css

Merge pull request #10171 from davidflanagan/bug878384

Bug 878384: don't autocorrect single-letters r=es92(cherry picked from commit 7611662e5c5649d446b9c61cf1dfaeff51934e94)

Merge pull request #10172 from davidflanagan/bug878838

Bug 878838: don't suggest the same word twice r=es92(cherry picked from commit 06890504218906b24dfdc568729d330e6316a645)

Merge pull request #10173 from davidflanagan/nondeterministic-autocorrect

Bug 879076: handle case of nearby keys correctly r=es92(cherry picked from commit 60d03c4ff2570844f868a7bedcd8b5249e3b27ea)

Merge pull request #10175 from davidflanagan/bug878843

Bug 878843 - Integrate with replaceSurroundingText for autocorrect (with... r=fabrice,djf(cherry picked from commit bc48562d5ede4d0c96f10557d64ccf9a5204253c)

tweak css for suggestions display because of keyboard layout differences between master and v1-train