Under a blanket of memes and enthusiast hacking projects lies a decades-long story of how Doom became one of the most ported games ever.