Further improve the robustness of image loading

Forcibly prevent WMF and EMF files from being passed to GDI+, as they
may cause it to silently fail (and bring down the whole program).

Also, check for images marked as being loaded successfully, but with a
width or height of zero.

Tons more comments and organizational improvements, too!