Fix relative path resolution in View.

Relative paths in view file names where handled very poorly before when
subdirectories were involved. This was not very important in 2.x but is
more important for 3.x as we have Cells and relative paths should work
properly there.

Refs #3945
Enforce that relative paths are contained within the template paths.

If user input was used to generate a view path, they could use
a relative path and try to escape the template path directories. Check
the paths if they look like bad things are going to happen.
Check for directory traversal in layout paths.

Refs #3945
Fix doc block and use a more generic error message.
Merge pull request #3986 from cakephp/issue-3945-view-path

Fix relative path resolution in View.