Structural rework of the original brandicph/ECGscanner-C. Didn't changed algorithms, though
For algorithms please refer to https://github.com/brandicph/ECGscanner-C
I just restructured it to make it possible to use in small ECG server, so codestyle may vary.
Actually, code is quite messy, so I didn't reworked its logic.