Check if a block is safe.
(check-safe-block block varset funtab) → modes
If successful, return the set of possible termination modes of the block.
As explained in add-funtypes, all the functions defined in a block are visible in the whole block, so we first collect them from the statements that form the block, updating the function table with them, and then we check the statements that form the block, discarding the final variable table.