Use ArrayRef in some function parameters instead of a pointer and count. No functional change.
Use StringRef to simplify code. No functional change.