Issue 13116: should reject returning `this` from a ref class member function

Fixes: https://issues.dlang.org/show_bug.cgi?id=13116
Basically, for class members, `this` is a local reference to the class instance, so returning it by ref amounts to returning a reference to a local variable (due to classes being reference types).
For structs, returning `this` by ref returns the address of the original struct, so there is no problem.
There is an unresolved issue with this fix, though: the following valid case is now rejected:
````
class C {
    void func() {
        ref C helper() {
            return this; // should be OK
        }
        auto tmp = helper(); // reference hasn't escaped, shouldn't be rejected
    }
}
````
Not sure how to fix this. Any pointers from dmd experts? ;-)