recent libfabric changes
Added some new functionality for the libfabric back end and incorporated some chnages in the structure of the code by Gordon. To avoid the libfarbic branch and master drifting too much apart, I merge these changes back before continuing on libfabric.