Minor fix in RewriteCond and RewriteRules to perform a faster match and fix in caching rules

If the match of '^.*$' is not used, it can be replaced with the regex
rule '^', witch means, 'match every string that starts'. This is
always the case.
This will gain some sub milliseconds performance increase because
the regex matching is faster.

Also fixed a possible glicht when looking for a cached file:
E.g.:
Old
---
RewriteCond %{DOCUMENT_ROOT}/cached/%{REQUEST_URI}.(html|xml|json|opml|svg) -f

Fix
---
RewriteCond %{DOCUMENT_ROOT}/cached/%{REQUEST_URI}\.(html|xml|json|opml|svg) -f

In the old version, the '.' was not escaped. This could lead to a
wrong lookup of the file, because the dot can be any character.

REQUEST_URI=glitch-json
-> %{DOCUMENT_ROOT}/cache/glitch-json as file exists, but %{DOCUMENT_ROOT}/cache/glitch.json
-> The file http://mydomain.tld/cache/glitch.json is returned, witch
ends up in a 404 error
This case is very rare, but possible.
Merge pull request #1140 in master
Merge pull request #1036 from dol/fix/rewrite_cleanup

Minor fix in RewriteCond and RewriteRules to perform a faster match and fix a glitch in caching rules
Merge branch 'hotfix/1036' into develop

Forward port #1036