Jit fixes for CUDA and OpenCL backends

- Fixes to ScalarNode
- Fixes to unary Math functions