Fixes #3750: Move THREAD_MAIN fix to v1.6

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

Custom patch based on:

r29113 [[BR]]
Fix the bug where MPI_is_thread_main returns true for all
threads when not in MPI_THREAD_MULTIPLE mode.
Thanks to Lisandro Dalcin for pointing it out.
Add note about MPI_IS_THREAD_MAIN