Fix GCC buildbot failures in API/Multithreaded tests
- fix typo initializing unique_ptr
- add missing throw specifier to play nice with older libstdc++ exception class