change extractMaskFromPatch to return readMask and writeMask
Summary:
Changed extractMaskFromPatch to return readMask and writeMask. ReadMask contains the fields that need to be read, and writeMask contains the fields that will be written when applying the patch. Note that readMask is subset of writeMask. This is used in `applyPatchToSerializedData`, and the benchmark shows that this will greatly improve the runtime if the patch clears the large fields (testcase 4).
```
============================================================================
AppplyPatchToSerializedDataBenchmark.cpp relative time/iter iters/s
============================================================================
patch_few_small_fields_without_partial_deser 17.59ms 56.85
patch_few_small_fields_with_partial_deser 121.65us 8.22K
patch_large_fields_without_partial_deser 16.23ms 61.60
patch_large_fields_with_partial_deser 16.38ms 61.04
patch_all_small_fields_without_partial_deser 133.46ms 7.49
patch_all_small_fields_with_partial_deser 324.74ms 3.08
patch_clear_large_fields_without_partial_deser 7.35ms 135.97
patch_clear_large_fields_with_partial_deser 84.82us 11.79K
```
Reviewed By: Mizuchi
Differential Revision:
D39222760
fbshipit-source-id:
202c6e22dc7595e94701bb027422e3569082d254