Characterizing elastic and piezoelectric constants of piezoelectric materials from one sample using resonant ultrasound spectroscopy