Because:
* fetchAndInsertSubscription wrote without stripeEventCreatedTime, so an
older event's stale fetchAndInsertCustomer write could overwrite it
* legacyFetchAndInsertCustomer rewrote customer and subscription docs
without stripeEventCreatedTime, which let a delayed older webhook
overwrite them with stale data
* Reading Stripe inside the transaction repeated Stripe calls on every
contention retry
This commit:
* Reads Stripe before the transaction in fetchAndInsertSubscription
* Skips subscription writes when a same-or-newer event is stored
* Stores stripeEventCreatedTime on subscription writes
* Passes event.created from processSubscriptionEventToFirestore
* Copies the stored stripeEventCreatedTime onto rewritten customer and
subscription docs in legacyFetchAndInsertCustomer
Closes #PAY-3937