[Refactoring] TypeFunction::purityLevel
fix Issue 12909 - [AA] Function is incorrectly inferred as strongly pure for associative array with key of non-mutable array or pointer as argument
fix Issue 12910 - [AA] `rehash` is incorrectly inferred as strongly pure for some associative arrays