Use proper alignment and padding for partition temporaries.

This CL changes the shared memory allocation in the NNAPI partitioner to
use proper alignment and padding for static and dynamic temporaries.

This CL also fixes a bug that the memory domain implementation cannot
figure out the step roles with interpreted control flow correctly. For
example, prior to this CL, if a model input is an input to an
interpreted IF operation, addInputRole will not identify the then and
else models as the prepared model roles of the memory, and may lead to
execution failure.

Bug: 184164929
Test: NNT_static
Change-Id: I177e1183ce9dac994c3093622774fc5e9d32e3b9
Merged-In: I177e1183ce9dac994c3093622774fc5e9d32e3b9
(cherry picked from commit 48ace20eddc19124a6245cef30c3a09c2236f3e4)
12 files changed