Add logarithmic axes.

As part of this, had to refactor how the axes were handled, deferring some
aspects until later. In particular, the minor ticks and logscale interacts very
weirdly... only set mxtics default looks consistently good, but even there it
is funky for fractional bases.