Fix matches_locale function

matches_locale was expecting input locale string to have at most one
underscore; as a result "zh_CN_#Hans" ignores "zh_CN" and matches into
"zh". Fix the match function and add unit tests.

Bug: 27837319
Change-Id: I4e8a66f91cae6ac2a46b6bf21f670d5ea564c7c8
diff --git a/minui/minui.h b/minui/minui.h
index e3bc005..fb0bbe1 100644
--- a/minui/minui.h
+++ b/minui/minui.h
@@ -84,6 +84,8 @@
 // Resources
 //
 
+bool matches_locale(const char* prefix, const char* locale);
+
 // res_create_*_surface() functions return 0 if no error, else
 // negative.
 //