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
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.
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
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
Removed cl_khr_fp64 from individual cl files

* Removed cl_khr_fp64 extension pragma from individual cl files
  and enabled it to be available via USE_DOUBLE marco
Merge branch 'devel' into ocl_win_fixes

Conflicts:
	src/backend/opencl/kernel/random.cl
	src/backend/opencl/kernel/random.hpp
	src/backend/opencl/program.cpp
correctly adding USE_DOUBLE to OpenCL JIT
Merge pull request #188 from arrayfire/ocl_win_fixes

OpenCL Fixes


- Double precision support is enabled only if supported by device.
- Double precision support is enabled only for double and cdouble.
- Fixed problems in Windows at exit for OpenCL backend.