ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction

ContextImpl::currentContext contains a reference to one of the
DeviceInfoImpl objects from:

static std::vector<DeviceInfoImpl> global_devices;

ContextImpl::currentContext is destroyed in the destructor
for the statically defined object __module, and relies on its
DeviceInfoImpl reference to query some hardware features while
being destroyed.

This means that we need to ensure that the global_devices vector is
destroyed affter __module, otherwise ContextImpl::currentContext's
DeviceInfoImpl reference will no longer be valid when __module is
destroyed.

Since these variables are all confined to a single compilation unit,
they will be destruct from bottom to top, so we need to make sure
that __module is the bottom definition so it can be destroyed first.
Merge pull request #3337 from tstellarAMD:2.4-ocl-context-cleanup-fix
iOS: fix crash from overrelease in UIImageToMat
fix installation layout for debian packages:

Install symlinks to shared libraries as a part of development package,
not runtime package.

It is default behavior for debian packages.
Merge pull request #3340 from AdLantis:2.4
viz: fixed memory leak, issue 3961
Merge pull request #3346 from Nerei:fixed_memory_leak_in_viz
Merge pull request #3341 from jet47:deb-package-lib-symlinks
Fix test name.
TIFF loader: Allocate large enough buffer when (bpp * ncn) > 8.
TIFF loader: Pass buffer size to read functions.
Merge pull request #3350 from Trundle:fix_some_tiff_crashes
turn on testing support in root binary directory
rewrite add_test command for accuracy tests:

* use new syntax introduced in CMake 2.8.0
* set OPENCV_TEST_DATA_PATH enviroment property
disable CTest target for opencv_test_viz:

opencv_test_viz creates windows and waits until user close them,
it is not appropriate for automatic testing
add CTest targets for sanity tests
determine test category (Public vs Extra) based on module location
Fixed highgui drawing test

- changed image comparison technique
- removed old assert statements
Fixes for QNX 6.6 Neitrino support.
avoid pointer arithmetic on register memory in color conversion