Adjust the encoding m_pos uses when pointing past the last element

Summary: This diff changes the way arrays encode m_pos when it points past the last
element. Before, ArrayData::invalid_index (-1) was used. This diff changes
it to uses a non-negative value that is greater than the position of the
last element (if there is a last element). This allows PackedArrays and
MixedArrays to set m_pos to 0 initially, and then they never need to update
m_pos when a new element is added.

Reviewed By: @edwinsmith

Differential Revision: D1384311
Create abstraction for things that can block on WaitHandles

Summary: Create abstraction for dependency graph that can include nodes that are
not WaitHandles. Introduce the following data structures:

- AsioBlockableChain, a structure to be embedded in the child, stores
  head of the linked list of parents
- AsioBlockable, a structure to be embedded in the parent, stores
  pointer to the next node in the linked list

This will be used by AsyncPoll, which will embed multiple AsioBlockables
(one per each dependency to be polled).

Reviewed By: @billf

Differential Revision: D1425998
Always save the state for the current block before switching to new one

Summary: In a diff I'm working on, I was hitting an assert in ##IRBuilder::insertLocalPhis## because the FrameState for a block hadn't been saved. Inspecting the code, I found this place where the FrameState for a block wasn't being saved before switching to another block.

Reviewed By: @bertmaher

Differential Revision: D1425862
Merge pull request #2 from facebook/master

从Facebook获取更新