Merge Element::needsPseudoElement into StyleResolver::createPseudoElementIfNeeded

Previously we'd calculate the pseudo element style even in cases where
we'd reject the pseudo element in needsPseudoElement. By merging the checks
we can avoid calculating the style in those cases.

Examples:
- dialog::backdrop would compute it even when the dialog was not in the
top layer.
- The parent renderer returned false from canHaveGeneratedChildren().

Originally we didn't compute the style in those cases but when the pseudo
element creation logic was moved from Element to StyleResolver we ended
up doing that extra work. This fixes that regression.

R=falken@chromium.org

Review URL: https://codereview.chromium.org/146663002

git-svn-id: svn://svn.chromium.org/blink/trunk@165804 bbb929c8-8fbe-4397-9dbb-9b2b20218538