add some numerical handling to Pow imaginary/real handlers

When the argument of the base of a power is a rational number, detecting real or imaginary values is possible. This processing was added to Pow._eval_is_imaginary and Pow._eval_is_real. In addition, a quicker exit was implemented.
sure. And it doesn't run through the assumptions system so that's why it is a property not an `_eval_is_hermitian` helper.