Fix for Coverity defect 1219940.
Merge pull request #887 from vasslitvinov/fix-coverity-1219940

Fix for Coverity defect 1219940.

Coverity said:

In resolveMove() we have:

  FnSymbol* fn = toFnSymbol(call->parentSymbol);

then we call fn->getReturnSymbol() without ensuring that 'fn' is non-NULL.
Indeed, 'fn' can be NULL - e.g. when 'call' is under a ModuleSymbol.

In practice this defect never fired for us, so this fix is just for Coverity.
While Coverity pointed to a particular occurrence of fn->getReturnSymbol(),
I fixed a couple of other places that I think Coverity could complain about.

* Replaced fn->getReturnSymbol() with 'isReturn', which I compute hopefully
in Coverity-legal way.

* Replaced fn->hasFlag() with call->parentSymbol->hasFlag().
Other alternatives are:
 ** fn && fn->hasFlag() 
    I chose against that to save a branch
 ** leave fn->hasFlag(), hoping that Coverity will realize that
      isReturn ==> fn != NULL
    It is probably not be worth the effort to check what Coverity
    thinks about it.

Mike conjectures that it may be best to separate the logic to handle
fn==NULL from that for fn!=NULL. This might be better done
when we start overhauling resolve altogether.

Reviewed by Mike.