A 42-light-year X-ray tail links a pulsar to previously ‘orphan’ gamma rays