Ports: https://github.com/dotnet/runtime/commit/7939172ea4d0052901215e83fb59e7172dcd13d0
## Summary
Due to libgdiplus behavior we were disposing metafiles twice causing the app to crash. This adds a ref count to avoid disposing a metafile when a graphics instance still has a reference to it.
## Customer Impact
Detected via tests.
## Regression?
No.
## Testing
Unit tests.
## Risk
Low-medium. The fix just adds a ref count to the metafile and avoids disposing it if it is still referenced by a graphics object.