Avoid cloning in log::simplify and power::simplify
#10086
Merged
log::simplify and power::simplify
#10086