Temperature coefficients of elastic constants of trigonal, hexagonal, and tetragonal crystals