Get rid of "helper" that was reimplementing struct.pack

The _long_to_byte_array helper was using array.array to reimplement struct.pack. Replacing it has made the code shorter, and quicker (tests run in 1.25s down from 1.9s on my machine).