Rotational excitation and damping as probes of interior structures of asteroids and comets