Format source code according to AnkiDroid conventions.

- Third-party packages were ignored.
- The com.ichi2.libanki package was ignored (but not the sub-packages).
- Some sections were spared an auto-format when it was clear the layout was intended by the author.
Remove more unused imports.
Merge pull request #337 from hssm/code-formatting

Code formatting