add scope for generateTreeList - resolves ticket 4028
Merge pull request #1585 from dereuromark/2.4-generatetreelist-scope

Bugfix: Add scope for generateTreeList

Fixes #4028
Remove the $state === 'after' condition.

Can only be before / after.
Merge pull request #1592 from kimegede/model-after-find-if-condition-remove

Reduce if condtion for finds
Use readline in console when supported

$this->stdin->read(); will use readline if the system is detected to
support it.  In linux, you will be able to use the left and right arrow
keys to edit the current line, use the up and down keys to navigate
history, press ^U to delete the entire line, etc.

Before this, using arrow keys in linux will just spam characters like
^[[C^[[A^[[D^[[C^[[A^.  Useful for "Console/cake console"
Correct style
ConsoleInput::_canReadLine change from private -> protected
Merge pull request #1594 from mreishus/feature-readline-support

Use readline in console when supported