more tests

- added tests for crashstats (look at those bugs)
- added test for handling bad packets
fixed 64-bit problems in crashstats

tools/crashstats.c made assumptions about the size of
pointers that would cause it to fail on 64bit systems.