Fix a bug of ocl retina on NVIDIA platform.
Merge pull request #1399 from pengx17:master_retina_ocl_fix
Replaced Ptr with my new implementation.
Boring changes - core.

This and several following commits contain the "boring" changes required
to support the new Ptr. These are changes like:

* new T -> makePtr<T> or .reset(new T) or Ptr<T>(new T)
  (depending on the situation)
* p.empty() -> !p
* delete_obj -> DefaultDeleter::operator()

and similar changes that are numerous, but primitive.
Boring changes - imgproc.
Boring changes - highgui.
Boring changes - bioinspired.
Boring changes - calib3d.
Boring changes - features2d.
Boring changes - ml.
Boring changes - nonfree.
Boring changes - objdetect.
Boring changes - photo.
Boring changes - softcascade.
Boring changes - stitching.
Boring changes - superres.
Boring changes - video.
Boring changes - videostab.
Boring changes - gpu.
Boring changes - gpuarithm.