Refactor out the resize event code from post-layout

Eric Seidel pointed out that the performPostLayoutTasks is getting
messy so I refactored out the code for sending the resize event in
a similar faction to how it was done in WebKit:

http://trac.webkit.org/changeset/150011

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

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