Mark extern calls as side-effect free.

This lets llvm hoist them out.

Also had to change the sliding window test, because this let llvm be
clever and call the call_counter fewer times.