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