Move device_ptr to the detail namespace

This deprecates the device_ptr class and moves it to the detail
namespace. The buffer_iterator class should be used instead of
device_ptr for referencing a memory location on the device.