$stdout is a shared data of all threads, so we must exclude other threads when it modify.
Since multi-threads may call Output.insert at same time (e.g. Core.error), it may causes a race condition.
doesn't swap $stdout in recusive call.
Merge pull request #151 from authorNari/protect_insert_from_competition

Output.insert should be exclueded