Libcore: Flag to fail thread creation

Add methods to set and reset a flag to mark when the zygote is not
allowed to create threads.

Bug: 27248115
Bug: 28149511

(cherry picked from commit c99008805238d8a292fc27e2efbf3fc83ae74634)

Change-Id: I1dc3620d9e7d0054c672b993d89459fc4b353dfc
1 file changed