WifiConfigurationUtil: Validate UTF-8 ssid length correctly

Validate the number of bytes in UTF-8 encoded SSID's. The previous
check was only validating the number of characters which could end up
violating the SSID length specification in the standard.

Also, added an extra validation in NativeUtil.decodeSsid() to ensure the
string is UTF-8 encoded.

Bug: 78483295
Test: Unit tests
Test: Able to add/update wifi network configs.
Change-Id: I46076ba6b309af006c10f6a9d4ab1d9bc40be428
4 files changed