7594: power rules correction so (x**y)**z != x**(y*z)

fixes #7594
As much as possible, the substitution logic is consolidated in Pow._eval_subs.