[Android] Refine the code and case of make_apk_test.

1. Reorganize the test cases for different mode option.
2. Add test case for checking the scenario without '--mode' option.
3. Add RunCommand function to reduce the code duplication.
4. Move the static function together.