Fixed k, v iteration, optimise for over range

This is based off the branch from this pull request: https://github.com/gosukiwi/Blueberry/pull/16

This fixes `for k, v in arr`-style iteration, which previously generated incorrect PHP code. It also optimises `for i in 1..10`-style loops to compile to `for ($i = 1; $i <= 10; $i++)` rather than `foreach (range(1, 10) as $i)`.