Changed black frame detection to average-luma based. Lowered threshold.

Changed black frame detection to average-luma based. Lowered threshold. Tested it with a fake webcam and with an external webcam that I covered totally or partially with my finger. Worked as intended.

Also some minor things.
Yeah I'm avoiding i==0 because of l.159, where I multiply threshold by the amount of pixels so far. This is to avoid dividing |accuLuma| by |i|, division being more computationally expensive than multiplication.

I could have added an if (i==0) continue; but that'd be silly, having to evaluate a condition every iteration of the for loop...