[SDL Widgets] Retaining the texture a little more often. Fix a few potential memory leaks.

Didn't notice any change in performance, but didn't really check thoroughly.