ticket:10865 Thread safety fixes to u_get_stdout().

git-svn-id: http://source.icu-project.org/repos/icu/icu/trunk/source@35693 251d0590-4201-4cf1-90de-194747b24ca1