Optimize Python Problem 14

Instead of storing a map down the chains, we now store the length of the
chain from each number.