fix cuda::BufferPool deinitialization

The deinitialization of BufferPool internal objects is controled by global
object, but it depends on other global objects, which leads to errors
caused by undefined deinitialization order of global objects.

I merge global objects initialization into single class, which performs
initialization and deinitialization in correct order.
move StackAllocator to cpp file

it is internal class, no need to export it
fix null stream initialization for multi-gpu systems
mark old CUDA device layer as deprecated and remove it from doxygen documentation

add a note to use new cudev module as a replacement
minor reorganization for CUDA doxygen groups:

move main CUDA group to modules/core/cuda.hpp
Merge pull request #3527 from jet47:cuda-deprivate-old-device-layer
Merge pull request #3523 from jet47:fix-cuda-buffer-pool