Add sysinit support with semaphore.
Introduced semaphore mechanism that prevents system services
from starting until init.d scripts finish executing.
This avoids conflicts with scripts like int2ext when services
are starting while data are being moved from data partition
to sd-ext partition.
WARNING: this approach requires the last init.d script that
sets ro.filesystem.ready property to 1 to continue boot sequence.
Otherwise device will not continue booting.
Example file: /system/etc/init.d/99complete
\#!/system/bin/sh
sync;
setprop ro.filesystem.ready 1;

Change-Id: Iae9b3c902c4f04c2ab254dabafbe4aee8715ac69
debuggerd: Fix minor memory leak

free_ptrace_context(context) doesn't free(context),
which leaks the memory allocated to context.

Change-Id: Ic199b257aefc9a05ec2d902958efa8a57a601fb1
Signed-off-by: Liangtao Gao <gliangtao@gmail.com>