battery - fix BATTERY_NOT_PRESENT detection, detection logic change (#13599)
* battery - fix BATTERY_NOT_PRESENT detection, detection logic change
Detection logic is refactored - battery voltage delta is tested each
50ms, voltage is considered stable when difference of last 10 samples
is smaller than 100mV
This makes stable threshold more forgiving than #13350 (time for
comparison is 50 instead of 500ms).
* battery - improve stable voltage detection
- voltageStablePrevFiltered every time delta is exceeded
- voltage within range is ANDed over 100ms periods
- voltage is stable if it was within range for 10 out of 11 periods
- slowly changing voltage will update threshold, but voltage will be
considered stable
- 1 update/s (100mV/s) is tolerated
* battery - fuix typos, improve comments