Closes #4638

Custom patch to complete the CMR.
Fixes #4650: Move r31814 to v1.8 branch (OSHMEM: Fix deadlock for collect)

---svn-pre-commit-ignore-below---

r31814 [[BR]]
OSHMEM: Fix deadlock for collect operation using various data sizes.

Deadlock when using the shmem_collect32()/shmem_collect64() routines and any of the non-root PEs pass 0 as the number of elements.
Algorithm in _algorithm_central_collector() does use 0 as a special value, and thus does not break out of the loop.

fixed by IgorI, reviewed by MikeD

cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4655: Move r31818 to v1.8 branch (OSHMEM: optimize print to spend)

---svn-pre-commit-ignore-below---

r31818 [[BR]]
OSHMEM: optimize print to spend less of formatting when not needed

fixed by Roman, reviewed by Miked
cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4656: Move r31819 to v1.8 branch (OSHMEM: add missing prototypes and)

---svn-pre-commit-ignore-below---

r31819 [[BR]]
OSHMEM: add missing prototypes and remove unused functions

fixed by Roman, reviewed by MikeD

cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4657: Move r31821 to v1.8 branch (btl/vader: don't leak registration cache)

---svn-pre-commit-ignore-below---

r31821 [[BR]]
btl/vader: don't leak registration cache items

Make sure to cleanup the registation cache when removing an
endpoint. This leak only affects systems with XPMEM installed.

Since this is in code specific to XPMEM not sure who could review so
sending it directly to the RM.

cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4659: Move r31823 to v1.8 branch (OSHMEM: fix for devices which)

---svn-pre-commit-ignore-below---

r31823 [[BR]]
OSHMEM: fix for devices which do not support sharedmr

disqualify itself and use next allocator

fixed by Igor, reviewed by MikeD

cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4661: Move r31832 to v1.8 branch (OSHMEM: fix warning)

---svn-pre-commit-ignore-below---

r31832 [[BR]]
OSHMEM: fix warning

fixed by Igor, reviewed by MikeD

cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4664: Move r31845, r31858 to v1.8 branch (atomic_impl.h: fix trivial typos in)

---svn-pre-commit-ignore-below---

r31845 [[BR]]
Removes few unreacheable warnings. This is somehow related to the
ticket #2645.

cmr=v1.8.2:reviewer=jsquyres

r31858 [[BR]]
atomic_impl.h: fix trivial typos in comments

cmr=v1.8.2:ticket=#4664
Fixes #4666: Move r31856 to v1.8 branch (OSHMEM: use bulk connect/disconnect API)

---svn-pre-commit-ignore-below---

r31856 [[BR]]
OSHMEM: use bulk connect/disconnect API

fixed by Yossi, reviewed by MikeD

cmr=v1.8.2:reviewer=ompi-rm1.8
Fixes #4668

Silence warning