Switched OpenCV to a 3-component version number.

Epoch is gone; now the version component names in C++ and CMake are consistent (except `REVISION` corresponds to `PATCH`).

This is a redone version of #1618.