Bugfix for opencl resource cleanup on windows

OpenCL resources on windows platforms seem to be
doing something wrong in reference counting due to
which the at program exit, applications throw runtime
error on clRelease* calls. Avoiding clRelease* calls
for windows platform for now.

Also, changed DeviceManager class memeber variables
naming convention.
Removed device selection from transpose test

* Increased abs diff for rotate_linear test because of windows
PERF: improvements to random number genration in CPU backend
Wrapping af_get functions in AF_CHECK macro
Changed setContext function scope

setContext is not being used anywhere else other than inside member
functions of DeviceManager. Therefore, moved setContext function
from global scope to protected scope of DeviceManager.

A similarly named function shall be added soon but with different
input parameters as part of graphics interop.
added isDoubleSupported func for opencl backend

This function shall be used to avoid creation of double
precision 'af::array'/'af_array' on an OpenCL device that doesn't
have corresponding hardware support.

Also modified af_info/af::info to print double precision capability
for each device listed.
Added double precision checks in opencl

Added sanity checks for all create*Array functions in opencl backend
to report an error to the user if they try to create double precision
arrays on devices which doesn't have that capability.
PERF: improvements to random number generation in CUDA backend
function to check double precision availability

* c api exposes af_get_dbl_support function
* cpp api exposes af::isDoubleAvailable function
handle double precision in opencl tranpose

* modified tranpose opencl kernel to handle double precision
  extensions appropriately
* added double precision sanity in tranpose opencl backend wrapper
* replaced std::vector container in transpose function with std::map
  to store cl::Program and cl::Kernel objects.
* added new helper function in testing framework `noDoubleTests` to
  check for double precision availability before proceeding to double
  precision data tests.
* modified tranpose tests to appropriately check for double precision
  availability
adding missing header in testHelper hpp
PERF: improvements to random number generation in OpenCL backend

- Change incorrect macro check "T == double" to IS_DOUBLE
- Added try catch block around cl.hpp calls in random.hpp
- format changes to program.*
FAST will return (af_)features instead of (af_)features *
Merge pull request #179 from pentschev/fast_return_fix

FAST will return (af_)features instead of (af_)features *
Merge branch 'devel' into perf
added getDevice internal function for opencl

this function can be used to retrieve the currently active device
modified buildProgram opencl helper function

buildProgram is used to build kernels for all devices associated
to a given context earlier.

After this change, kernel shall be built only for currently active
device.
moved ocl kernel resources from stack to heap

cl::Program and cl::Kernel objects were being created on global
stack earlier. Even though that is efficient and worked fine on
linux and macosx platforms. It caused out of control runtime errors
on windows platforms at the exit of the application that is using
the library. This could be mostly a driver bug in OpenCL drivers
for windows, therefore this change might be reverted in future.
Moved cl_khr_fp64 extension

* Moved cl_khr_fp64 extension pragma to common location.
* Modified the following functions to reflect the above change.
    * transpose
    * reduce
    * scan
    * binaryOp
* added line of code in scan unit tests to handle double precision
  related checks for devices that doesnt have the necessary hardware
PERF: improvements to CUDA JIT when memory is linear