dalvik: Use common SchedPolicy type and fix getpid() vs. gettid() bug

Signed-off-by: San Mehat <san@google.com>