Add IORef capability to GrSurfaceProxy objects - take 2

Re-landing of https://skia-review.googlesource.com/c/4734/ (Add IORef capability to GrSurfaceProxy objects) with fixes for:
 platforms that don't support discards.
 memory leak due to copying over of GrSurfaceProxy's creation ref to instantiated GrSurface in instantiate()

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4827
BUG=skia:

Change-Id: If0b695d5cafc5ef3fdd251c38262849d09e5d27f
Review-Url: https://codereview.chromium.org/2502923003
diff --git a/gn/tests.gni b/gn/tests.gni
index d888c6a..2cf9d33 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -158,6 +158,7 @@
   "$_tests/PremulAlphaRoundTripTest.cpp",
   "$_tests/PrimitiveProcessorTest.cpp",
   "$_tests/ProxyConversionTest.cpp",
+  "$_tests/ProxyRefTest.cpp",
   "$_tests/ProxyTest.cpp",
   "$_tests/QuickRejectTest.cpp",
   "$_tests/RandomTest.cpp",