Asteroid 5335 Damocles and its implications for cometary dynamics