Behaviour of shiftL/shiftR undefined with negative shifts

This PR replaces calls to `shiftL` and `shiftR` with `shift`. Seems to be at least partly to blame for https://github.com/haskell/ThreadScope/issues/45.

However I'm also a bit suspicious about the bitwise operations on `Word` and `Int` since the size of these is not fixed and may be as small as 29 bits. Perhaps `Word32` would be preferable? Also, [this is a bit worrying!](https://github.com/gtk2hs/gtk2hs/blob/master/gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs#L234)