This commit contains more than I intended. Read below for more info.

1) Fixed the preview window. It now correctly displays the source.
2) The GLX backend now correctly uses the devices current swap.
3) We now set device->cur_swap to a default so we don't have to check it in every function.
4) Minor syntactical cleanups and perhaps some messiness added.
Removed no longer valid comment
Merge branch 'master' of https://github.com/jp9000/obs-studio