scop detection: run isValidCFG as early as possible

to discard regions with invalid CFG before going through the contents of the
basic blocks
scop detection: run isValidLoop as early as possible

to discard regions with invalid loops before going through the contents of the
basic blocks
scop detection: remove an iteration over all uses
ScopDetect: check region entering edges are valid.

When a region header is part of a loop, then all entering edges of this region
should not come from the loop but outside the region. Otherwise, the loop may be
only partially part of the region, which would cause troubles in handling
induction variables.

Currently, we can only model induction variables that are either fully part of
the scop (loop induction variable) or induction variables that are scop-
invariant (parameter). A loop that is only partially part of the
scop causes troubles, as there is no good way to handle the induction
variable in the independent blocks pass.

Contributed-by:    Star Tan <tanmx_star@yeah.net>