Simplify bytestring insertion and port performance improvements

These commits cover most of my work that got lost in the last merge. All tests pass and the internals are simplified.

I added individual .cabal files for the tests and the benchmarks because `cabal` gets confused by the bytestring testsuite/benchmarks depending indirectly on the bytestring library.