LinuxKPI: sysfs: implement sysfs_match_string()
Use a macro to automatically gather the length of the array while
we can.
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50007
(cherry picked from commit f94d7319540b9b2256be60c2c666efe0b6e635ef)