Test device functionalities.
Fix bugs in cj_Device.c. Tested on Accelerando.
Tested on Macbook Pro with a Geforce card.
Add autotunning feature.
Fix dqueue bugs (prev = NULL, next = NULL).
Implement memory distribution.