Add a custom thrust cuda implementation.

Making a custom thrust device adapter and array management for the cuda device.
The reason for this is that we first we want to add texture support to
cuda input arrays, and secondly the current implementation fails to compile
with Thrust 1.8. The compile failures seem to be caused by the converting
everything to device pointers.

Note: This currently has a bug were all arrays are being wrapped as if
they are an implicit array. This needs to be removed so that we can
leverage better thrust algorithms that understands device memory references.