Use Word32 instead of Word for values that must be 32 bits long

The code in `TreeStore.hs` does bit twiddling on `Word` values which have an unknown number of bits - this PR changes them to use `Word32` which has a known size, which should satisfy the TODO comment there.