Codegen: some refactoring of Result class, add NamedResult subclass

1.  Result subclasses Variable so it has a name.  That name gets the
    dummy "result_" symbol just like result_var does.

2.  Result can take dimensions kwarg.  Maybe not allowed in C/Fortran
    but some language might be ok with this.

3.  New NamedResult subclass.  Use this for situations where you want
    to name an return value.  Result if for return values where we
    don't care what its called or we suspect it won't be used (e.g.,
    "return(x*y)".)