Convert scap-1 to python

Convert the scap-1 bash script to a pair of python functions.
sync_common contains the core business logic and sync_common_main
provides a wrapper with command line arguments and error logging.

This patch also introduces a utility function for constructing sudo
calls and a small number of doc tests.

Change-Id: Ida1cc1e149383cf26388494fb642e738da30be12
Merge "Convert scap-1 to python"