Re #1704:
 - Fix duplicate code on os_winphone.h
 - Change the use of PJ_WIN32_WINPHONE to follow the code convention
 - Fix incorrect link of the Thread library
 - Handle exception raised from select() API. However the break window will still be shown when debugging on Visual Studio. To disable it, from Debug>Exceptions>Win32 Exceptions> unmark the "An invalid handle was specified” exception.



git-svn-id: http://svn.pjsip.org/repos/pjproject@4777 74dad513-b988-da41-8d7b-12977e46ad98
Fixed #1743: Unplugging the earpeace while audio is running would cause audio to stop in BB10 10.2.1. This also fix the issue in #1732

git-svn-id: http://svn.pjsip.org/repos/pjproject@4778 74dad513-b988-da41-8d7b-12977e46ad98