Faster IndexOf for substrings (#63285)
* Improve "lastChar == firstChar" case, also, use IndexOf directly if value.Length == 1
* Try plain IndexOf first, to optimize cases where even first char of value is never met
* add 1-byte implementation
* copyrights
* fix copy-paste mistake
* Initial LastIndexOf impl
* More efficient LastIndexOf
* fix bug in Char version (we need two clear two lowest bits in the mask) & temporarily remove AdvSimd impl
* use ResetLowestSetBit
* Fix bug
* Add two-byte LastIndexOf
* Fix build
* Minor optimizations
* optimize cases with two-byte/two-char values
* Remove gotos, fix build
* fix bug in LastIndexOf
* Make sure String.LastIndexOf is optimized
* Use xplat simd helpers - implicit ARM support
* fix arm
* Delete \
* Use Vector128.IsHardwareAccelerated
* Fix build
* Use IsAllZero
* Address feedback
* Address feedback
* micro-optimization, do-while is better here since mask is guaranteed to be non-zero
* Address feedabc
* Use clever trick I borrowed from IndexOfAny for trailing elements
* give up on +1 bump for SequenceCompare
* Clean up
* Clean up
* fix build
* Add debug asserts
* Clean up: give up on the unrolled trick - too little value from code bloat
* Add a test
* Fix build
* Add byte-specific test
* Fix build
* Update IndexOfSequence.byte.cs