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.
This new method seems to have many smalls details for no apparent reason. I could imagine reason for them.. but honestly why not have it simpler? Anyhow I will comment on the details.