fix Issue 8307 - inconsistent treatment of auto functions
fix Issue 13336 - auto ref return deduced to be ref despite return value coercion
Merge pull request #651 from 9rnsr/fix13336

Issue 8307 and 13336 - fix documentation around return type inference and ref deduction