Fixes #3861: Move r29512 to v1.7 branch

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

r29481 [[BR]]
Fix various bugs in mca_base_pvar.

Fixes:

 - Segmentation fault when using watermark variables.

 - Segmentation fault when using a handle bound to a no longer valid
   performance variable.

 - Incorrect return codes from MPI_T_pvar_* functions.

cmr=v1.7.4:reviewer=jsquyres

r29496 [[BR]]
Add a little more to the docs for mca_base_var_enum_create().

r29512 [[BR]]
Small fixes for the MCA variable interface.

 - Make a copy of enumerator data for default enumerators. This will allow
   the caller to free their data once the enumerator has been created. This
   is a change from just referencing the values array.

 - Make mca_base_pvar_notify check if the pvar is valid before calling the
   notify callback. This fixes a segmentation fault when destroying handles
   after MPI_Finalize().

cmr=v1.7.4:ticket=#3861
Fixes #3866: Move fix for compiler warning in rcache to 1.7

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

r29510 [[BR]]
Fix compiler warning.

r29511 [[BR]]
Make casting very clear.