Add REGPARM to mtrace function definitions

These functions are marked REGPARM in cpu-all.h, but were not at the
definition site.  On i386, this makes the two types different.  This
went unnoticed because on all other architectures REGPARM expands to
nothing.
Fix warnings about some pointer<->integer casts on 32-bit
json: Use PRIx64 instead of %lx

Fixes a build error on 32-bit.
Fix 64-bit assumption in static_assert

Instead of checking for an exact length, check that the length is
acceptable to bb_hash.