First cut at modifying PageStage#findOrCreateHeadElement such that it groups stylesheet elements, non-script elements, and script elements, in that order.  There are probably ways in which this code can be further optimized.
Merge branch 'master' into feature/pagestage-nodes-reorder
Formatting.