Fix side effects test to have a dependence on all results from extern call

Otherwise llvm is clever and only does the last one.
Move all allocas to the top of the function

This means we don't need to do explicit stacksave/stackrestore. This makes
foo.compute_at(bar, x) faster, because it includes less stack-related junk.