[llvm] Change the implementation of isValidFeatureListFormat (#219266)
This is mostly to change the function-local static variable because some
programs are having static initialization order problems. Also the
coding standard states statics with ctor/dtor should be avoided. The new
implementation also does not use Regex anymore.