Topic/array to map refactor

So here's what I've done so far. See what you think.

There's still a ways to go in my opinion, but thanks so much for getting a basically correct implementation pushed. It's a lot easier to polish and tweak something when the underlying behavior seems correct.

I found a few places where I think there were some minor bugs. Polynomial#zero for instance only checked if the terms array was empty, but other places there were defensive checks looking for terms that were zero. At this point I think most of that stuff should be fixed. I was thinking about having polynomials store more information; it seems reasonable to imagine them storing their degree, for instance.