PublishQueue: extract duplicate optimistic update helper
PublishQueue: extract duplicate optimistic update helper

Summary: Extracts duplicated logic for handling rebased and new optimistic updates into a single helper. This also reduces closure allocations a bit by avoiding them for rebased updates.

Reviewed By: jstejada

Differential Revision: D16768142

fbshipit-source-id: ac8e0b50c21a22674be9b145663aaf9aecc99187

josephsavona/relay,xuorig/relay,cpojer/relay,iamchenxin/relay,kassens/relay,iamchenxin/relay,xuorig/relay,kassens/relay,josephsavona/relay,xuorig/relay,kassens/relay,atxwebs/relay,voideanvalue/relay,yungsters/relay,xuorig/relay,wincent/relay,josephsavona/relay,xuorig/relay,iamchenxin/relay,kassens/relay,voideanvalue/relay,cpojer/relay,yungsters/relay,voideanvalue/relay,voideanvalue/relay,wincent/relay,wincent/relay,voideanvalue/relay,yungsters/relay,facebook/relay,facebook/relay,cpojer/relay,wincent/relay,wincent/relay,cpojer/relay,kassens/relay,atxwebs/relay,facebook/relay,wincent/relay,facebook/relay,facebook/relay,voideanvalue/relay,xuorig/relay,facebook/relay,atxwebs/relay,atxwebs/relay,kassens/relay,iamchenxin/relay