Do not modify document in StyleResolverState

Change StyleResolverState::initForStyleResolve to take a const Document
pointer and move code that modifies the document to StyleResolver.

BUG=260293
R=eseidel@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19232002

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