Purge extents argument to IterationSpace constructor

It's unncessary since it can be reconstructed from the block shapes.
This also avoid an inconsistency in the way the extents were
previously determined: we were taking the tuple of arities of the
maps of the last argument, which is wrong if not every arg uses the
same map.

While at it, consistently name variables that refer to the block
shape block_shape.
If arg is flattened, use arity for index into ind/loc_map
Support flattened vector-valued Dat/Mat args in OpenCL
Support flattened vector-valued Dat/Mat args in CUDA

This requires changing the LMA block indexing for flattened args.

In the case of rmap and cmap arity 3 and rmult and cmult 2 we need
the local block numbering to be:

 0  4  8 |  1  5  9   The 3 x 3 blocks have the same
12 16 20 | 13 17 22   numbering with an offset of:
24 28 32 | 25 29 33
-------------------     0 1
 2  6 10 |  3  7 11     2 3
14 18 22 | 15 19 33
26 30 24 | 27 31 35
Merge pull request #284 from OP2/purge-itspace-extents-argument

Purge extents argument to IterationSpace constructor, which is
unncessary since it can be reconstructed from the block shapes.  This
also avoid an inconsistency in the way the extents were previously
determined: we were taking the tuple of arities of the maps of the
last argument, which is wrong if not every arg uses the same map.

While at it, consistently name variables that refer to the block
shape block_shape.

Also add support for flattened vector-valued Dat/Mat args in OpenCL
and CUDA. For CUDA this requires changing the block indexing for
flattened args in a rather horrific way using two divisions and two
modulo operations.