Cleanup and augment string handling based on https://github.com/mono/mono/pull/15522.
1. When comparing strings, check pointer equality.
Faster when they match, slower when they do not.
2. Provide string lowercasing into a provided buffer, which can equal
the input, to avoid extra malloc/free.
3. define G_STRING_CONSTANT_AND_LENGTH(x) (x), G_N_ELEMENTS (x) - 1
e.g. strncmp (foo, G_STRING_CONSTANT_AND_LENGTH ("version"))
Commit migrated from https://github.com/mono/mono/commit/
8c288f06664c65050b153da0a8952209adc958a0