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.