A statistical algorithm for fast estimation of heart rate and localization of cardiac sounds in phonocardiograms recorded by electronic stethoscopes