Fix defaults button behavior in advanced settings

Original change in 1c8df6329ac6e3b8d28c68ee7001cc12a1dd935d modified the unused
second parameter for BM_SETCHECK instead of sending BST_CHECKED as first
parameter
Increase limit on log window contents

This should make the log window have effectively infinite size
Make a few bug fixes (by shader)
Add red text reference for Optimize button and tweak optimize message box

The message box caption really shouldn't say "Error"
Move ScopeGuard to OBSApi
Minor fix, correct AppWarning text.
Merge pull request #318 from shaderdyn/master

Minor fix, corrected AppWarning text.