Add a better memory test

The old memory test is actually pretty worthless, this new one
actually computes something of interest.  The problem with the old
test is that in simply loaded every word directly after it stored it,
so it didn't actually check that the memory functions.