Twenty Thirteen: better handling of media in main content area, accounting for a sidebar and all viewport width possibilities. Props sabreuse and obenland, see #23955.

git-svn-id: http://core.svn.wordpress.org/trunk@23964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Thirteen: adjust JavaScript handling for scrolling and finding viewport heigh/width to better support various IE versions. Also consolidate variables at the top of the file per best practices. Fixes #23841, props obenland.

git-svn-id: http://core.svn.wordpress.org/trunk@23965 1a063a9b-81f0-0310-95a4-ce76da25c4cd