Support prebuilt shared libs end with versions

This commit changes how `cc/androidmk.go` generates LOCAL_MODULE_STEM,
LOCAL_MODULE_SUFFIX, and LOCAL_BUILT_MODULE_STEM.  Now, `splitFileExt()`
takes a file name and a list of expected file extensions.
`splitFileExt()` searches the first occurrence of expected file
extensions in the file name.  If it can not find any, it will simply
return the last file extension.

Before this commit, `cc/androidmk.go` simply extracts the last file
extension (e.g. `.so`).  However, if the prebuilt shared libs end with
version numbers (e.g. `libc++.so.1`), it will use `$(LOCAL_MODULE).1` as
LOCAL_BUILT_MODULE_STEM and this will lead to missing target ninja
error.

Bug: 111579848
Test: Build a program that links libc++_host (from prebuilts/clang)
Change-Id: Id96726c69705d518ea725bb6abd8ff4527ca0cbc
diff --git a/Android.bp b/Android.bp
index 26aeac2..83ec569 100644
--- a/Android.bp
+++ b/Android.bp
@@ -174,6 +174,7 @@
         "cc/gen_test.go",
         "cc/library_test.go",
         "cc/test_data_test.go",
+        "cc/util_test.go",
     ],
     pluginFor: ["soong_build"],
 }