Issue 12909 & 12910 - fix purity level calculation for AA parameter

[Issue 12909](https://issues.dlang.org/show_bug.cgi?id=12909) - [AA] Function is incorrectly inferred as strongly pure for associative array with key of non-mutable array or pointer as argument
[Issue 12910](https://issues.dlang.org/show_bug.cgi?id=12910) - [AA] `rehash` is incorrectly inferred as strongly pure for some associative arrays