Stops rangefinder and cleans up resources when back button is pressed on the Navigation Bar.