Validator update: check for successors/predecessors at each basic block

+ By convention, only the first basic block in a Function.BasicBlocks
list can have zero predecessors. Accordingly, only the fake exit block
can have zero successors.
+ Minor improvements in code