Verify that main is running on main thread
Verify that main is running on main thread

This patch adds a check to verify that we're running on the main thread
when running the async-main function.

tkremenek/swift,gregomni/swift,tkremenek/swift,benlangmuir/swift,rudkx/swift,parkera/swift,gregomni/swift,rudkx/swift,JGiola/swift,benlangmuir/swift,gregomni/swift,parkera/swift,apple/swift,gregomni/swift,xwu/swift,atrick/swift,JGiola/swift,parkera/swift,ahoppen/swift,rudkx/swift,gregomni/swift,hooman/swift,roambotics/swift,apple/swift,JGiola/swift,tkremenek/swift,tkremenek/swift,ahoppen/swift,benlangmuir/swift,xwu/swift,JGiola/swift,tkremenek/swift,atrick/swift,ahoppen/swift,glessard/swift,glessard/swift,rudkx/swift,parkera/swift,atrick/swift,rudkx/swift,benlangmuir/swift,roambotics/swift,roambotics/swift,apple/swift,hooman/swift,apple/swift,xwu/swift,parkera/swift,hooman/swift,parkera/swift,hooman/swift,rudkx/swift,hooman/swift,apple/swift,parkera/swift,ahoppen/swift,atrick/swift,ahoppen/swift,xwu/swift,xwu/swift,roambotics/swift,atrick/swift,benlangmuir/swift,parkera/swift,glessard/swift,xwu/swift,hooman/swift,tkremenek/swift,glessard/swift,apple/swift,atrick/swift,JGiola/swift,roambotics/swift,roambotics/swift,gregomni/swift,ahoppen/swift,JGiola/swift,glessard/swift,hooman/swift,xwu/swift,benlangmuir/swift,tkremenek/swift,glessard/swift