prov/psm: re-enable fi_cq_read as a progress function

Always poll PSM if the buffer is NULL. This allows fi_cq_read
be used as a progress function when called with NULL buffer.

This was true in the past, but a recent optimization would cause
PSM polling be skipped if the cq is not empty.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: check for negative (unlimited) timeout in fi_cntr_wait

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: honor timeout in fi_cq_sread

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: check for async CQ update in fi_cq_sread

A CQ could be updated asynchrously by the AM handlers (RMA, atomic
operations, etc). As the result, even if PSM polling doesn't return
anything for the current CQ, it is possible to break out from the
blocking wait.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: set default CQ or CNTR wait object to none.

Both CQ and counter support blocking access via timed polling even if
no wait object is defined (attr.wait_obj==FI_WAIT_NONE). This can also
be applied to the FI_WAIT_UNSPEC case.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: add domain to the waitset and pollset structure

The domain information is necessary for wait and poll operations.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: implement the poll operation for pollset

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: enable polling counters in a pollset.

Keep track of the counter value of last access. This allows quick
checking of whether the counter has been updated.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Merge branch 'master' of ssh://github.com/ofiwg/libfabric
Merge pull request #318 from j-xiong/master

prov/psm: updates on wait and poll operations