core/image_build.py: add acls for odm partition

This change adds baseline support for applying access controls
to files during image creation.  It is done by extending FileAcl
objects to generate fs_config and file_context entries that can
be used by make_ext4 during build_image.py.

Additionally, WriteFile() tracking was added to SysrootStub and
proper sysroot checking is done for CreateTargetCache tests.

This approach uses the layered fs_config approach in make_ext4
which layers file permissions on top of the compiled in fs_config by
placing binary fs_config files in etc/fs_config_files and
etc/fs_config_dirs.

(See https://source.android.com/devices/tech/config/filesystem.html
 for more information.)

file_context support only applies for ODM images, not system images.
Follow on work will integrate per-target file_context.bin compilation
with image creation completely.

TEST=test_runner.py; built odm images and check perms. looking in the bin for selinux strings.
     built system image and checked perms
BUG=27740194

Change-Id: Icce105ccf40d8991a50ac04b2e5700fa26990952
13 files changed