Add basic unit tests for BaseInputConnection.
Also some trivial changes in BaseInputConnection:
- Mark some files with @NonNull & @Nullable annotation.
- Fix possible NPE in commitContent().
- Marks public methods for overriding InputConnection interface with @Override.
- Format file via google-java-format.py.
Bug: 240359838
Bug: 241503197
Test: atest FrameworksCoreTests:BaseInputConnectionTest
Test: atest FrameworksCoreTests:SurroundingTextTest
Test: atest CtsInputMethodTestCases:BaseInputConnectionTest
Change-Id: Idf77d69bcd4d84a48742e0d7a24398df3c0ae7f8