Reject continue() without loop block (#14013)

To track the nested loop levels a counter is used.
It gets incremented while entering a loop block
(e.g. foreach or while) and gets decremented when leaving
the block. Because scope borders for example at function
borders must be taken into account the counter is put into
a stack. With every new scope an empty counter is pushed on
the stack, when leaving the scope the original value is restored.

This enables easy querying if the continue (and later also break)
command is properly nested within a loop scope.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Reject break() without loop scope

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>