Split library from executable
I already tried splitting the library part from the executable in 20f5d124 but had to revert the commit because hadrian didn't support building components with both a library and an executable. But now ghc/ghc!10904 is going to fix this, so once that is merged we can attempt the split again.