Don't reset cachedSize to 0 in getSerializedSize

This avoids a race-condition when cachedSize is momentarily set to 0
for non-empty messages if multiple threads call getSerializedSize
(e.g. during serialization).

Change-Id: I15a8ded92edbf41bf1c8d787960c5bbbc8a323c5
Merge "Don't reset cachedSize to 0 in getSerializedSize"
Revert "Don't reset cachedSize to 0 in getSerializedSize"

This reverts commit c6e12c6702ca764486f952654ba1568f00efe813.
Merge "Revert "Don't reset cachedSize to 0 in getSerializedSize""
Don't reset cachedSize to 0 in getSerializedSize

This avoids a race-condition when cachedSize is momentarily set to 0
for non-empty messages if multiple threads call getSerializedSize
(e.g. during serialization).

This is a retry of https://android-review.googlesource.com/#/c/88570/.
getSerializedSize() has been kept non-final so that messages generated
with a previous version of the compiler will not break.

Change-Id: I8d8154a10938cde579ae19c55eae55b1e70e0bda
Merge "Don't reset cachedSize to 0 in getSerializedSize"