Make squash commits step more pythony in push-to-trunk script.

Get rid of linux-only shell commands. Solve issue with quotation marks in commit messages.

Further behavioral change: Strip white space on line endings. Strip trailing new lines.

Test=python -m unittest test_scripts

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@18305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00