oshmem configury: tighten up the pshmem checks

Make the checks for macro weak symbols be equivalent to the checks for
weak symbols.

Also fix up several OSHMEM configure checks:

* fix an errant AC_MSG_REQUEST
* don't check for profiling ability during configure options checks.
  Instead, defer it to later, when we have weak symbol check results.
* don't directly call _FOO macros from the top level
* make setting up OSHMEM profiling similar to MPI profiling: create
  OSHMEM_SETUP_PROFILING macro
* cache the results of checking for macro weak symbols (for parity
  with the weak symbol check -- although we should really
  revisit/audit the whole cache-checking scheme throughout all m4
  code; it may well be inconsistently used)
* add some more [] m4 quoting, even in the original C weak symbols test
* style: fix some whitespace errors

Refs #4868