Switch from using 'var' to 'ref' for return intent

This changes all occurrences of RET_VAR to RET_REF in the compiler. A warning will be displayed to the user if they try and use a 'var' return intent.

I've also updated our module code and tests to the new syntax, mostly via

`gsed -E -i 's/((proc|iter) .* +)var/\1ref/' [files]`