Special case more simple patterns
fnmatch is slow, so avoiding it in more cases is good. This implements
a more generic version of match_simple_wild which needs some
pre-processing of patterns. In particular it supports patterns of the
form PREFIX*SUFFIX (where all parts are optional), i.e. a super set of
what's handled now. Most section matchers of this form and hence don't
need any calls to fnmatch anymore.
We retain the implementation of match_simple_wild for the filename
matchers (they aren't called often enough to matter).