An extremely luminous X-ray outburst at the birth of a supernova