Add optional argument headers to Kernel

Allows passing additional system headers to be included.
Allow executing user code snippet in kernel wrapper

Add an optional argument user_code to the Kernel constructor, which
allows specifying a code snippet which is to be executed at the very
start of the generated kernel wrapper. This allows executing some
code as a one-off, such as setting a random seed.
Document Kernel parameters
Add example usage of headers, user_code to docstring
Fix a bug when using vectorizer and split together
Treat IOError exception as cache lookup failure
Merge pull request #362 from OP2/fix-vectorizer

Fix vectorizer and splitter bug
Merge pull request #361 from OP2/feature/user-headers-and-code

Users can specify custom headers and code snippets for kernels
Avoid creation of nested blocks in the IR
Merge pull request #363 from OP2/fix-nested-blocks

Avoid creation of nested blocks in the IR
Add note on extra configure options for PETSc + OpenMP
Make arg_vec variables thread local in OpenMP

Move declarations inside openmp parallel region.
Merge pull request #312 from OP2/petsc_doc

Mention PETSc configure options for running with openmp backend.
Merge pull request #291 from OP2/openmp-threads

Move declarations of vec args to within parallel regions.
Raise exception if generated code differs across ranks
Note requirement for uniform generated code across ranks
Add test that Dat copy increases version of copied-into Dat
Add modifies_argn decorator

Use this to indicate that a method modifies its nth argument.
Add modifies_argn decorators to Dat.copy and Solver.solve
Fix semantics of multiple par_loops INCing into a Global

Consider the following:

  par_loop(count, set, glob(INC))

  par_loop(count, set2, glob(INC))

Where count is a kernel that increments its argument by one.  After
execution of these par_loops, we expect to see a value of set.size +
set2.size in glob.  However, in parallel we see something larger than
this.  This is because the first loop performs a parallel reduction such
that glob takes the global value of the set size.  This is used to
initialise the reduction for the second loop which is wrong.  Instead,
create a temporary Global with value zero (the identity for summation)
and sum this reduced value into the output Global when done.