OpenCL constant memory support

Although the branch is "gpu_constant_memory", it currently only supports OpenCL. The pull request grew larger than I expected, and supporting constant memory in CUDA will be substantially different.

This partially addresses issue #328.
I don't think these comments are correct (the reduction domain is innermost by default). Did you fork this file from another test? It looks familiar. If so we need to fix the original too.