Fix bad sentinel value in constant folding

The expansion of ``range(2**10)'' led to huge lists that in turn led to
memory burst.
Prevent unrolling of non-nested loops

Otherwise, some loop nests with constant bounds are fully unrolled,
which leads to code burst. To do so, implement an analysis to count the
number of instruction in the loop body.

As a side effect, remove useless ``if 1:`` in generated code.