Fix bug of the destructor of SkSVGDevice
Fix bug of the destructor of SkSVGDevice

When SkSVGDevice owns `fWriter`, we must ensure that `fRootElement`
is destructed before `fWriter`. Otherwise, while `fRootElement` is
destrcuting, it tries to write data into `fWriter` who is alreay
deleted.

This bug is introduced by
https://skia-review.googlesource.com/c/skia/+/192040.

Change-Id: Idbb998a3c25f6e0d731e5070fd9f9bdde3afcd1a
Reviewed-on: https://skia-review.googlesource.com/c/192301
Reviewed-by: Florin Malita <a8262bf13ea8c26821e91ea9bca6740a77c96dcd@chromium.org>
Commit-Queue: Florin Malita <a8262bf13ea8c26821e91ea9bca6740a77c96dcd@chromium.org>

google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,rubenvb/skia