Refine old-ACL representation of new-ACL hostnames.

The old-style ACLs used regex matching on hostnames, alongside exact
matching; new-style uses only sub-domain and exact matching.  So map
sub-domain matches to regexes in the natural way.
Make regex tests accept const-qualified parameters.

The string passed to IsRegex or IsPathRegex is not modified, so allow
these to be passed a const pointer; likewise for IsRegexItemIn's regex
and the list of entries that's used to check.
Handle old host-regex properly as sub-domain in new ACL.

This resolves
     TODO clean up possible regex, if it starts with ".*"
     then store two entries: entry, and *dot*entry.
from an old comment.  I'd inadvertently implemented this direction of
mapping by mistake when I set out to do the - much easier (see
previous commit) - reverse transform and got confused.  So, might as
well not waste it.

Note that a regex that doesn't make sense as either a sub-domain match
or a simple domain name shall now be ignored, where it was previously
added to the host-name ACL; but, since it wouldn't have matched
anything anyway in the new-style ACL, there should be no harm in
omitting it.
Merge pull request #1897 from ediosyncratic/acl-fixes

ACL fixes in core