Fixes #4048: Move r30106 to v1.7 branch (ensure that rankfile-provided allocations are correctly handled)

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

r30106 [[BR]]
Ensure that rankfile-provided allocations are correctly handled

Fixes #4043

cmr=v1.7.4:reviewer=jsquyres:subject=Ensure that rankfile-provided allocations are correctly handled
Fixes #4017: Move CUDA-aware fix for running in non-CUDA environments to v1.7

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

r30032 [[BR]]
Fix so we do not get warnings when running on system without CUDA software installed and CUDA-aware compiled in.

r30034 [[BR]]
Fix return value.

r30137 [[BR]]
Add braces per coding convention and design review.