style(eapi-bash): combine unnecessary, extra logical expressions
style(eapi-bash): use globbed matches instead of substrings

Slightly easier to read in certain cases and slightly faster than
substring extraction/matching.
style(eapi-bash): use globbed matching instead of pattern substitution

Easier to read and fixes cases where arguments containing a string such
as "--libdirt" would have caused a false positive for the related
"--libdir" expression.
style(eapi-bash): simplify duplicate slash stripping for --libdir args

The __strip_duplicate_slashes function comes straight from portage.