[Proposal] [4.2] Blade Compiler Improvements [Take 3]

This is the speed improvements and bug fixes made to the blade compiler by @dyatlov in #2952 with the correct laravel coding standards. I hoped this could be reviewed again by @taylorotwell. It would be such a shame to throw away @dyatlov's good work. This a replacement for #3684 because it got a bit messy...