Synchronize construction of TApplication

It was possible for multiple threads to attempt construction of a
TApplication or for one thread to think the TApplication was already
constructed while another thread was in the process of doing the
construction.
Merge pull request #41 from Dr15Jones/lockConstOfTApplication_v5-34-21

Synchronize construction of TApplication