move allocMatFromBuf function to farneback.cpp:

* it is the only place, where it is used
* no need to make this function public
rename CudaMem -> HostMem to better reflect its purpose
move CUDA core tests to core module
add more FeatureSet constants
add cuda::HostMem::getAllocator method

it allows to use cudaHostAlloc methods for cv::Mat objects
add Allocator parameter to cudev::GpuMat_ contructors
refactor CV_CUDA_TEST_MAIN, use CV_TEST_MAIN for it

use CV_CUDA_TEST_MAIN for opencv_test_core to initialize CUDA
device information
fix GpuMat::swap method:

add swap instruction for allocator field
improve error reporting in _InputArray methods
Merge pull request #3531 from jet47:cuda-core-refactoring