New functions for caching GDI+ graphics containers and pen handles

I hoped this would fix the problem of extremely slow histogram rendering
on XP, but alas, it's still terrible.  Seems to be a problem inherent to
the XP GDI+ line implementation.

As I'm strongly opposed to custom implementations for XP, users will
simply have to live with a delay during filled histogram rendering, or
just not use the filled option.