allow callbacks to modify attachements by moving the decision to calculate boundary value into the correct position inside _render()
Test to proof that render itself should handle the boundary.
also move protected variable resetting into the correct scope
Fix for #3318

Fixes https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3318

It seems fixing this in the htaccess file(s) isn't going to work even though a url rewriting based solution was more clean. On the plus side this works for any web server.
If a url is called with "index.php" in it then the CakeRequest swallows this part and fixes the path. Any linked url from the requested page will have a clean url. Thus after following one of these urls this problem is gone anyway.

Some code docblock improvements to CakeRequestTest.php
Added test case for fix
Also now you can call just index.php even if you have url rewriting enabled
Merge pull request #1375 from dereuromark/master-cake-email

Move boundary calculation inside _render()
Don't load classnames with `..` in their names.

Classnames with . in them are invalid and can be leveraged to load code
outside of an application by traversing directories.
Merge pull request #1377 from ravage84/fix-for-3318

Trim off webroot/index.php when determining base and url.

Trimming off index.php from url and webroot/index.php from base url allows the correct values to be created when a path contains index.php in it.

Fixes #3318
Fix coding standards.
Use simpler and faster code.

substr_compare() is up to 2x slower than just substr(). Use a faster,
more common, and simpler to read variant of the same thing.
use strict comparison for strings
Removed superfluous break

In every case of the if clause it will return, so break is not needed.
Merge pull request #1394 from ravage84/patch-2

Removed superfluous break
Backporting from 2.4 fix for booleans in mysql when running PHP 5.5
coding standards and simplification of else cases as well as some minor fixes
simplify else cases
Merge pull request #1395 from dereuromark/master-cs

coding standards and simplification of else cases as well as some fixes
coding standards and else block simplification
Merge pull request #1396 from dereuromark/master-cs-else-block

coding standards and else block simplification
ticket-3902 - paginator and display of order via model default order
fix cs