common.sh, ...: add support for ext2-ro/rw hack

Copies the helpers from crosutils.git/common.sh but uses
printf with octals for portability. This should update all
locations where we mount root rw and disable_rw_mounts just before
a final sign.

TEST= in progres; plz help :)
BUG=chromium-os:7972

Change-Id: Ibdd23cb30335942c36d537663aabea605a2f8704

Review URL: http://codereview.chromium.org/3987001
3 files changed