Issue 9148 - 'pure' is broken

https://issues.dlang.org/show_bug.cgi?id=9148

A nested function inside `pure` function should also be typed as `pure`, and considered as weak purity function.
Note: the fixes will still be escapable due to https://issues.dlang.org/show_bug.cgi?id=11048