In fact it is not really required to break binary/source compatibility to have new implementation. If you change class declaration to

    class CV_EXPORTS PyrLKOpticalFlow
    {
    public:
        PyrLKOpticalFlow();

        void sparse(const GpuMat& prevImg, const GpuMat& nextImg, const GpuMat& prevPts, GpuMat& nextPts,
            GpuMat& status, GpuMat* err = 0);

        void dense(const GpuMat& prevImg, const GpuMat& nextImg, GpuMat& u, GpuMat& v, GpuMat* err = 0);

        void releaseMemory();

        Size winSize;
        int maxLevel;
        int iters;
        double derivLambda; //unused
        bool useInitialFlow;
        float minEigThreshold; //unused
        bool getMinEigenVals;  //unused

    private:
        GpuMat uPyr_[2];
        vector<GpuMat> prevPyr_;
        vector<GpuMat> nextPyr_;
        GpuMat vPyr_[2];
        vector<GpuMat> unused1;
        vector<GpuMat> unused2;
        bool unused3;

        GpuMat buf_;
    };

then this class remains source and binary compatible with old version.