Add original persistance.cpp file from OpenCV 2.4.2