Calculator: improve exponent handling

[Eventually I will mention the issues which this is intended to resolve somewhere in this area.]

I have added a number of test cases which show arbitrary levels of nested exponents, but I am sure I am missing something.

@jagtalon Could you poke at this with some of your jazzed-up nested expressions and see where it falls down? Please don't look too carefully at the code itself, unless you are hoping to go blind or crazy. I will refactor it when I have gained some perspective (and hopefully failing test cases)