Change the block representation (version bumped to 3.9.0.0)

This patch implements the change to the block representation as agreed
with Norman.  I also took the liberty of doing a lot of refactoring
and rearrangement to make the code organisation more logical.  A
summary of the API changes is below.

Summary of refactorings:

 - Compiler.Hoopl.Block contains the Block datatype and all the
   operations on Blocks.  It seemed like a good idea to collect all
   this stuff together in one place.

 - Compiler.Hoopl.Graph now has the operations on Graphs.

 - Compiler.Hoopl.Util and Compiler.Hoopl.GraphUtil are no more; their
   contents have been moved to other homes.  (and a bit of duplicated
   functionality has been removed).

 - I removed the newtypes around Unique and Label, these are now just
   type synonyms.  The newtype wrappers were costing some performance in
   GHC, because in cases like mapToList the newtype isn't optimised away.

   This change might be controversial.  Feel free to complain.

Other changes:

 - Optimisations to the Dataflow algorithms.  I'm not actually using
   this implementation of Dataflow in GHC any more, instead I have a
   local copy specialised to our monad, for speed.  Nevertheless I've
   put some of the optimisations I'm using in the GHC version into the
   generic library version too.

Summary of API changes:

ADDED

 - IsMap(mapInsertWith, mapFromListWith)

 - mapGraphBlocks
   (was previously called graphMapBlocks, and not exported)

 - mapBlock'
   (strict version of mapBlock)

 - New API for working with Blocks:

    -- ** Predicates on Blocks
  , isEmptyBlock

    -- ** Constructing blocks
  , emptyBlock, blockCons, blockSnoc
  , blockJoinHead, blockJoinTail, blockJoin, blockJoinAny
  , blockAppend

    -- ** Deconstructing blocks
  , firstNode, lastNode, endNodes
  , blockSplitHead, blockSplitTail, blockSplit, blockSplitAny

    -- ** Modifying blocks
  , replaceFirstNode, replaceLastNode

    -- ** Converting to and from lists
  , blockToList, blockFromList

    -- ** Maps and folds
  , mapBlock, mapBlock', mapBlock3'
  , foldBlockNodesF, foldBlockNodesF3
  , foldBlockNodesB, foldBlockNodesB3

REMOVED

 - mapMaybeO, mapMaybeC
   (no need: we have Functor instances)

 - Block constructors are no longer exported
   (use the block API instead)

 - blockToNodeList, blockToNodeList', blockToNodeList'', blockToNodeList'''
   (use the block API instead)

 - tfFoldBlock, ScottBlock, scottFoldBlock, fbnf3,
   BlockResult(..), lookupBlock,
   (I don't know what any of these are for, if they're still important
   we could reinstate)

CHANGED

 - Compiler.Hoopl.GHC is now Compiler.Hoopl.Internals and exports some
   more stuff.

 - Label is not a newtype; type Label = Unique
 - Unique is not a newtype: type Unique = Int
   (these newtypes were adding overhead)

 - blockMapNodes3 is now mapBlock3'

 - Lots of internal refactoring and tidying up
fix warnings
add some missing exports
add TypeSynonymInstances

It seems this is now implied by FlexibleInstances, but maybe it wasn't
in older GHC versions.
Rename BTail -> BCons, BHead -> BSnoc
Put back the newtype around Label

It was a pain having Label==Int, because we can't make Label-specific
instances for things.  The performance drop doesn't seem significant.
Fix build with GHC 7.0
small optimisations to blockSnoc and blockCons
add mapFilter
SimpleUniqueMonad: define instance for Functor

.. for convient use of `<$>'
Merge branch 'master' of /home/nr/tmp/hoopl-patched

I've validate this patch against GHC HEAD.
Norman Ramsey <nr@cs.tufts.edu>
Add comment to .cabal file saying what GHC 7.6.1 shipped with
Bump version number following new policy

We now keep the HEAD version numbers as values which would be suitable
for immediate release.