Fix exception handling in Constant.assign
Test mismatched shape assignment to Constant
Make Constant instantiate the appropriate ufl constant

FFC deals specially with ufl Constant, VectorConstant and TensorConstant
objects, so our Constant should really be an instance of the appropriate
type.  To do this, we have to do some __new__ voodoo to set up the
inheritance correctly.
Test more restriction combinations for vector constant
Merge pull request #230 from firedrakeproject/fix/constant_voodoo

Correctly assemble forms with Constants on interior facets.  To do this,
a Constant needs to inherit from the appropriate UFL type depending on
the shape of its value.  We do this with a small amount of Python class
voodoo.
Initial import of assembly cache.

This is an essentially unmodified import of George Boutsioukis' code.
delint
Clean up some logic
Replace obsolete debug function
Attempt to move the cache hook

Since assemble now returns Firedrake objects, we need to cache the
thunk, not the assemble. This doesn't work yet.
Fecking lint
Fix cache dependencies

The form cache was ignoring whether the Functions passed in as
dependencies the second time around were the same as those used in the
cache. This is clearly wrong.
Some closure magic

Change some variable names to stop the parser getting confused by a closure.
Also realise that the matrix retrieved from cache must be copied in place.
Move the assembly cache to the new location.
Attempt to take BCs into account in the cache
BCs are invalid if their counts differ
Fix bc zeroing semantics.
One missing piece of zero logic
Move zero inside the thunk.

This means we don't spuriously zero the tensor we're about to reuse.
Cleanup caching code