Allow bits to be built for GHCJS

GHCJS doesn't support linking to C, naturally, so I made `Data.Bits.Extras` optionally use `unsafeIndex` into `ByteString`s instead of linking to static C arrays.

Now that the tables exist in both C and Haskell, there is a generator script to produce them both so that the canonical list of magic numbers can be in only one place.  Cabal doesn't really have great support (or indeed as far as I can tell, any support) for ad-hoc pre-build code generation like this, so it's a Python program with the outputs checked in.