allow haml and slim to have access to scope and locals during compile time

Same as the PR I did for hogan_assets not too long ago
https://github.com/leshill/hogan_assets/pull/18