Visitors from afar, comets have amazed and mystified us since the beginning of mankind.