Adding thread safety to proto uploader

Due to lack of thread safety it seems that protobuf values were
occasionally getting deleted during parsing, causing ubsan to register
an error down the line in the protobuf library.

Bug: 128991260
Bug: 128810613
Test: atest cts/tests/tests/keystore/src/android/keystore/cts
Change-Id: Iee7ec6195e1e0aa4b28a7484737f984ed389a75e
2 files changed