Improved HCSR04 test

Refactored code to use extension methods for waiting and timing the echo
pin