Move GetTipOfTrunkSvnRevision to gclient.py and cleanup tests.

I'm planning on reusing GetTipOfTrunkSvnRevision outside of
cros_mark_chrome_as_stable, so I'm moving the function to gclient.py
so it can be reusable.

Besides this, I've updated the script to consistently use
cros_build_lib.RunCommand so that we don't need to switch between
mocking out this and cros_mark_chrome_as_stable.RunCommand in the
test. This keeps the test simpler and easier to understand.

BUG=chromium-os:36324
TEST=Run all unit tests. Chrome trybots.

Change-Id: I12741c66874aff8cfd870bac166cceb9c7ef7e82
Reviewed-on: https://gerrit.chromium.org/gerrit/43135
Reviewed-by: Ryan Cui <rcui@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
3 files changed