CMake changes and additional C++ helpers

I originaly intended to just migrate the xcomposite plugin to xcb, but i ended up with so much stuff before i even started that it's worth its own PR.

Most notable addition with this is a (yet incomplete) C++ plugin class collection header in libobs, that makes it possible to write C++ based plugins without a single C function, just with a class that implements a defined interface.

So far i only implemented the interfaces up to the Video Source Plugins, but i will add all the possible other ones later.

Also includes a fix for the opengl debug function to not crash under any cirsumstances and to support the NOTIFICATION level messages.
This isn't relevant to https://github.com/BtbN/obs-studio/commit/a760a7f50419e4c9a8e832d209e7627d33f1a1b9