Fix LBP variance calculation

Also, compute the variance in Cython, which is several times faster.
Fixes scikit-image/scikit-image#966 .