precompile: do better union split and concrete compilation search (#56496)
This fixes some bugs that prevent compile-all from working correctly at
all, and uses more of it for normal compile. Increases sysimg size from
about 140 to 170 MB of data and 11 to 15 MB of code