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)