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 think the comparison can just be an operator< in BufferSize itself. Then you can use the two-argument form of sort.