Use 'unsigned long' as base type for test_data

It's still 32-bit on ARM, so it doesn't make much difference, but it is
the Right Thing to do, and in theory this code could run on 64-bit ARM
CPU's at some point in the future.

Also, tweak compile options and ecalloc() function layout.