libcutils: Fix race issues in mspace_usable_size

There is race issue in mspace_usable_size which was used in dalvik.
Which makes mspace_usable_size return size 4 bytes less than real
size.

original Id: Ic07f4b4532e35671822b560a631bf0377fdc3204
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>

picked from
https://android-review.googlesource.com/#/c/34270/
Merge "libcutils: Fix race issues in mspace_usable_size" into gingerbread