Resolve active render target in D3D9 before switch

On D3D9 platforms that work on active render target instead of
a specified surface, the resovle of the previous RT must happen
before the new RT becomes active.
Merge pull request #140 from mendsley/resolve

Resolve active render target in D3D9 before switch
Cleanup.
Fixed clang warning: equality comparison with extraneous parentheses.
Disabled clang warnings in glsl-optimizer.
Merge branch 'master' of github.com:bkaradzic/bgfx
Disabled unknown pragma warning in GCC.
Fixed initializer order warning.
Added missing linker dependency.
Fixed SAL define and MinGW standard library argument collision.
Cleanup.
Added defines argument for bgfx project script.
Cleanup.
Fixed undefined defines errors.
Cleanup.