Refactoring/improvement of issue 8408, and additionally fixing Issue 8998

Essentially, there is no relation between PUREstrong and the isolation of returned value.
I had misunderstood about that, and mis-implemented it in pull #1110 for issue 8408.
So this also is a refactoring change of #1110.

Additional fix:
[Issue 8998](http://d.puremagic.com/issues/show_bug.cgi?id=8998) - 'inout pure' returns immutable, which in reality is mutable

By fixing issue 7769 (relax inout rule), we cannot assume a function with inout parameters as PUREstrong, 
because the return type may not have any inout indirections.

Requires: https://github.com/D-Programming-Language/dmd/pull/1512