Control and sampling circuitry for the synchronous detection and measurement of ultrasonic pulse echoes