OctaveCodePrinter: use "^" instead of ".^" if base/exp both constant

E.g., `pi**3` to "pi^3".