Add support for host<->dev copies of non-contiguous buffers.
Add test for non-contiguous gpu copy
Prevent possible infinite loop on a malformed buffer_t

If the buffer was all-zeros, this could have looped forever.
Better comments. No clFinish on copies to dev.
Modified to test non-contiguous innermost stride, checked entire domain, expanded to 4D.
Added declarations for cuMemcpy3D.
Used clEnqueue(Read/Write)BufferRect for the 2 innermost dimensions of a copy.
A few small debug checks/info.
Merge branch 'gpu_non_contiguous_copies' of https://github.com/halide/Halide into gpu_non_contiguous_copies
Added debug output for outer dimensions in copies.
Made test run on smaller subset to avoid very large numbers of copies.
__ -> _ to avoid reserved names in C/C++
Reorganize the copy logic to hopefully be clearer.
Be less clever about handling malformed buffer_t's
Sorted the dimensions of a copy by stride.
Added clFinish to halide_copy_to_dev.
Fixed folding loop bounds and some corner cases regarding zero stride dimensions.
Merge pull request #351 from halide/gpu_non_contiguous_copies_sorted

Gpu non contiguous copies sorted
Merge pull request #348 from halide/gpu_non_contiguous_copies

Gpu non contiguous copies