Boring changes - samples.
Replace an incorrect usage of Ptr with a simple vector.
Java: removed usages of Ptr<T>::addref().

Now the features2d class wrappers use composition instead of inheritance.
Adapt Python bindings to the new Ptr.
Added to CV_INIT_ALGORITHM a Ptr creation function, for convenience.

Also changed the static functions to inline, to stop GCC complaining
about unused functions.
Replaced calls to Ptr<T>::ptr to ::dynamicCast.
Made Filestorage able to not own its CvFileStorage instance.

This allows to get rid of the last remaining Ptr<T>::addref calls.
Rewrote the documentation for Ptr to fit the new implementation.
Fixed some dubious uses of tbb::task_scheduler_init.