Track nested loop levels in CMake language with a stack of counters

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 will allow easy querying if the break command is properly nested
within a loop scope.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
break: Add policy CMP0055 to check calls strictly

Reject break() without loop scope or any arguments.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Merge topic 'break-command-strictness'

d54617d0 break: Add policy CMP0055 to check calls strictly
bae604d9 Track nested loop levels in CMake language with a stack of counters