Baseline wander estimation and removal by quadratic variation reduction