Add specs for String#sub with hash second argument
Implement Hash argument handing for String#sub

Fixes some specs for gitlabhq
Add spec for method that uses a local with a call to same method
Use better check_for_locals logic

This fixes the issue where arguments would see the used local. This
ensures in those cases we always emit a call since we don't want to use
the locals then.
Add ERB tags for 1.8 mode