init & close on main thread

with latest SDK, initializing outside of the main thread doesn't send
the events through. This causes the library not to get the EVF images
or images that are taken.
There was also a deadlock on the queue thread joining - which is
improved by this update (closing in main thread)