Simplify experiment segment name validation

Instead of using a regular expression to check for invalid characters,
we use a simple for-loop.  This allows us to get rid of the regex
object, which is the only thing in the .bss section and thus we are
saving 4KB of memory.

Also fix a bug in the validation logic where previously "foo.bar."
would be deemed valid.

Bug: 138856262
Test: Run unit tests.
Test: objdump -h server_configurable_flags.so. Check .bss is gone.
Change-Id: Id9bed9bed7c2cc5b2e4bdb8f8e2e9b2611ddbe2f
1 file changed
tree: af25c513c331b52110f5749175c36214acae1289
  1. disaster_recovery/
  2. libflags/
  3. .clang-format
  4. Android.bp
  5. OWNERS
  6. PREUPLOAD.cfg