fix ContentPane to clean up style nodes

Clean up style nodes that are created and placed in the document head
when destroy is called on a ContentPane with renderStyles set to true
When renderStyles is true, <style> nodes are created in the head of the
document but are not cleaned up when the ContentPane is destroyed. Fixes #18175

(cherry picked from commit 030a12f37183d67e63200fe39acd2925eb662d7d)
(cherry picked from commit efe2d8e3c59e7d4f4448e4f18d76046f3645432c)