Fix #846: array.flat() was incorrect with non-contiguous empty arrays with a non-zero dimension size.
Add another test
Merge pull request #852 from pitrou/fix_846

Fix #846
Bugfix for make_array_ctype in cudadrv

The structure of the array ctype created by make_array_ctype did
not match the structure of the array structure returned by
make_array - it was missing the nitems and itemsize fields. This
commit:

- Adds these fields into the struct created by make_array_type,
- moves make_array_ctype into numba.targets.arrayobj,
- moves logic from calc_array_sizeof into the CPU target,
- adds a unit test so that further issues of this kind can be
  caught. Moving the two functions above was necessary for this
  test to run on non-CUDA systems (and their new locations are
  arguably logical anyway).
Fix for issue #847

The GUFuncBuilder needs to remember the order in which signatures
were specified in order to select the correct implementation for
function dispatch. This commit implements this based on similar
functionality in UFuncBuilder.
Merge pull request #855 from gmarkall/issue_847

Fix for issue #847
Merge pull request #854 from gmarkall/fix_make_arr_ctype

Bugfix for make_array_ctype in cudadrv
Document macro-expansion stage
Add header to IR dumps
Add docstrings to macro.py