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