Fixed memory leak and began preparing for 64bit

Threads that terminated with _endthreadex do not call constructors of the
current scope.
Converted much of the plugin to std::string and std::vector in preparation
of a 64bit executable (removing dependencies on OBSApi)