[flang] Better error message for RANK(NULL()) (#93577)

We currently complain that the argument may not be a procedure, which is
confusing. Distinguish the NULL() case from other error cases (which are
indeed procedures). And clean up the utility predicates used for these
tests -- the current IsProcedure() is really just a test for a procedure
designator.
14 jobs for main
in 0 seconds and was queued for 100 minutes and 47 seconds