[hack] Add tests around shared memory counter logic
[hack] Add tests around shared memory counter logic

Summary:
This diff tests a few simple properties of the shared memory counter that
provides globally unique, monotonically increasing (up to wrapping) integers.

I noticed that the first id provided is actually 2, since the early counter
starts at 1 but is prefix incremented. I changed this to 1 and added an
assertion around that.

I'm adding these tests because I'm going to make this logic slightly more
complicated.

Reviewed By: gabelevi

Differential Revision: D13741739

fbshipit-source-id: 04580e50a8c2811ccfcfcb39f6c00490ebecd2c3

mroch/flow,facebook/flow,popham/flow,gabelevi/flow,popham/flow,gabelevi/flow,gabelevi/flow,samwgoldman/flow,samwgoldman/flow,samwgoldman/flow,samwgoldman/flow,facebook/flow,gabelevi/flow,popham/flow,samwgoldman/flow,mroch/flow,facebook/flow,mroch/flow,popham/flow,popham/flow,facebook/flow,samwgoldman/flow,gabelevi/flow,facebook/flow,popham/flow,mroch/flow,mroch/flow,gabelevi/flow,mroch/flow,gabelevi/flow,mroch/flow,popham/flow,samwgoldman/flow,facebook/flow,facebook/flow