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 nodes in the loop body.

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