Rewrite doins by python.

doins is written in bash. However, specifically in case that
too many files are installed, it is very slow.
This CL rewrites the script in python for performance.

BUG=chromium:712659
TEST=time (./setup_board --force && \
     ./build_package --withdev && \
     ./build_image --noenable_rootfs_verification test)
===Before===
real    21m35.445s
user    93m40.588s
sys     21m31.224s

===After===
real    17m30.106s
user    94m1.812s
sys     20m13.468s

Change-Id: Ib10f623961ba316753d58397cff5e72fbc343339
Reviewed-on: https://chromium-review.googlesource.com/559225
Commit-Ready: Hidehiko Abe <hidehiko@chromium.org>
Tested-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
3 files changed