Update LayoutEngine.swift (Swift 4 Upgrade) (#32)
Update LayoutEngine.swift (Swift 4 Upgrade) (#32)

* Update LayoutEngine.swift (Swift 4 Upgrade)

I have:
- safely unwrapped the semaphores 
- Moved the javascript completion handler to the Main Thread, since the new Main Thread Checker was complaining about UI changes (https://developer.apple.com/documentation/code_diagnostics/main_thread_checker)

* Update LayoutEngine.swift

* Added unowned self in Javascriptqueue

phimage/Erik,phimage/Erik,phimage/Erik