Ultrasound for defect detection and grading in wood and lumber