performance improvements in Model::_clearCache

- don't empty cache twice if pluralized name is identical to underscored
- refactors for fewer function calls
Refactors Model::_clearCache

- don't use mixed keys in $assoc array
- removes unnecessary strtolower on Inflector::underscore result
- return early
Changing order of jpeg aliases so that mapType() returns the most common one
Fix issue 4116 and also merge both versions of home.ctp
Merge pull request #1694 from dereuromark/master-home-ctp

Only show the rewrite rule error message if the default CSS is in place.

Fixes #4116
Do not assume CONTENT_TYPE is available.

In some server environments notably the CLI server, _SERVER['CONTENT_TYPE'] is not available.
In these cases, fall back to the HTTP_CONTENT_TYPE header.

Refs #GH-1661
Merge pull request 1661 from 'sime/fallback-content-type' to master.
Merge branch 'master' of github.com:cakephp/cakephp
Make String::wrap() unicode aware. Solves #3981.
Merge pull request #1695 from renan/2.4-wordwrap

Make String::wrap() unicode aware. Fixes #3981.
More gracefully handle invalid data in Accept headers.

Some browsers have invalid accept headers, we should ignore the invalid
extension data as assuming it will be a qualifier can result in
incorrect results.

Fixes #4105
Fixing CS errors.
Updated returns in docblocks in File utility
Fixed CS error
Additional grammatical corrections to File utility
Rrue to True, simple typo
Merge pull request #1701 from bcrowe/hotfix-phpcs

Fixed CS error
Merge pull request #1700 from bcrowe/hotfix-filedocblocks

Updated returns in docblocks in File utility
Fixed setting "required" attribute for file input. Closes #4124

In general fixed the issue where enabling SECURE_SKIP for a field
skipped "required" attribute check altogether. Instead now "required"
is set to false for hidden fields by default.
Merge pull request #1703 from ADmad/2.4-file-input-required

Fixed setting "required" attribute for file input. 

Fixes #4124