Assignment of ErrorObj serial number needs to use an atomic
ErrorObjs from other threads were being deleted twice
Moved std::atomic<> class static in header to file static in source to avoid gccxml parsing problems.
Merge pull request #995 from Dr15Jones/fixThreadProblemsWithErrorObj

Misc fixes -- Fix thread problems with ErrorObj