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, so if you haven't merged that yet, you can see just what this changes here: https://github.com/TazeTSchnitzel/Blueberry/compare/unify_tests_examples...optimised_for~~ (EDIT: #16 was merged, so this doesn't matter now)

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)`.