libhwc2.1: enable thread safety analysis

Add -Wthread-safety compilation flag and fix the build break.

Bug: 285487960
Test: Build pass
Change-Id: Id5314c7c14a2c24ab2dedddd424a895945fb355c
Signed-off-by: Leo Chen <yinchiuan@google.com>
7 files changed