PetscOptionsInsertFile: combine Bcasts for alias and values

This is an attempt to work around a BG/Q bug in which some sequences of
collectives deadlock.  This packs the options aliases and values into a
packed buffer that can be communicated with a single MPI_Bcast.

Suggested-by: Vitali Morozov <morozov@anl.gov>
Sys: add failing test expanding ~/file-name and ~user/file-name

> $(realpath ~/file-name) != /home/jed/petsc/src/sys/examples/tests/~/file-name
> $(realpath ~jed/file-name) != /home/jed/petsc/src/sys/examples/tests/~jed/file-name
Sys: avoid getpwuid in file path routines

This function is badly implemented by some well-known supercomputing
vendors (causes corruption and crashes) and ~ expansion in the shell
uses $HOME rather than the password home directory field anyway.

This commit does not affect the failing test for path expansion.
Sys: fix PetscGetFullPath expansion of ~ and ~user, ensure NULL termination

Also update test to check that paths are handled as well as possible
when the paths are too short.  Still not bulletproof.

If the path is much too short (not tested here), then
PetscGetWorkingDirectory will fail with an error because getcwd fails.
cleanup includes that are no longer needed. Also remove check for _fullpath() as
the corresponding code is removed.
config: avoid string argument to __attribute((deprecated))

Intel only supports __attribute((deprecated("string argument"))) when
`which gcc` returns a sufficiently recent version.  Cray likes to
configure libraries with different modules loaded than the user will
find in their default environment.  This indirect sensitivity to
environment is too fragile, so we have to avoid the feature entirely.
Sys ex13: avoid non-portable realpath(1) in verification test

Unfortunately for this purpose, realpath(3) errors if a file does not
exist.  This is different from the GNU coreutils' realpath(1) which only
needs the parent directory to exist.  So make the test split into (dir,
base) and only use realpath(3) for the directory, then put the path back
together.

Reported-by: Barry Smith <bsmith@mcs.anl.gov>
KSPDGMRES: fix conditional variable declarations

Incorporate local BLAS/LAPACK variables with each #if !defined(missing)
case rather than trying to conditionally declare the variables at the
top of the function which is messy when several possibly missing
blas/lapack functions are used.

Reported-by: Loris Bennett <loris.bennett@fu-berlin.de>
PCGAMG: remove distracting comment
PCGAMG: fix corruption for multiple solves when MatSetNearNullSpace is used

Member pc_gamg->data_sz was not being updated and thus caused corrupt
memory access.  New test runex56_nns demonstrated the failure and now
runs correctly.

Reported-by: Garth N. Wells <gnw20@cam.ac.uk>
Helped-by: Jed Brown <jedbrown@mcs.anl.gov>
Mat SBAIJ: avoid invalid memory read in MatSOR_SBAIJ

In the back-solve, the software prefetching code computes the previous
line length and issues prefetch instructions before relaxing a row.  For
the first row, the "previous row" does not exist so the indexing was
invalid.  Now just make sure the index is non-negative.

Reported-by: Patrick Lacasse <patrick.m.lacasse@gmail.com>
Mat: add MATOP_ values for missing functions
config: define lang-specific macros in petscconf.h, choose in petscsys.h

C and C++ compilers can use different spellings for concepts like
"restrict", "static inline", and "__func__".  Previously, these were
defined for the "C language", meaning that they could fail if when
clanguage=C PETSc headers are included by a file that is being compiled
by the C++ compiler.  This happens outside of PETSc, but also with
third-party packages like Elemental (matelem.cxx).

Karl Rupp proposed an implementation that puts the __cplusplus dispatch
into petscconf.h, but I prefer that petscconf.h contain no logic.

Reported-by: Geoffrey Irving <irving@naml.us>
Reported-by: Geoff Oxberry <goxberry@mit.edu>
Merge branch 'jed/avoid-getpwuid' into maint

 The file path routines were broken because the current directory was
 placed in front of the given path before checking for leading ~ or
 ~user. This is now fixed, along with the removal of getpwuid (a
 liability on BG/Q and Cray). We still attempt to use getpwnam when
 encountering ~user.

* jed/avoid-getpwuid:
  Sys ex13: avoid non-portable realpath(1) in verification test
  cleanup includes that are no longer needed. Also remove check for _fullpath() as the corresponding code is removed.
  Sys: fix PetscGetFullPath expansion of ~ and ~user, ensure NULL termination
  Sys: avoid getpwuid in file path routines
  Sys: add failing test expanding ~/file-name and ~user/file-name

Conflicts:
	config/PETSc/Configure.py
Merge branch 'jed/options-insert-bcast-bgq' into maint

Attempt to work around BG/Q MPI_Bcast bug.  It is unknown whether it is
successful, but this uses fewer communications so it should not be
worse.

* jed/options-insert-bcast-bgq:
  PetscOptionsInsertFile: combine Bcasts for alias and values
Merge branch 'jed/fix-mat-sbaij-sor-prefetch' into maint

* jed/fix-mat-sbaij-sor-prefetch:
  Mat SBAIJ: avoid invalid memory read in MatSOR_SBAIJ
Merge branch 'barry/fix-dgmres.c' into maint

* barry/fix-dgmres.c:
  KSPDGMRES: fix conditional variable declarations
Merge branch 'jed/attribute-deprecated-compat' into maint

Fixes error encountered when using Intel compiler and changing gcc on
PATH between configuring PETSc and building an application.

* jed/attribute-deprecated-compat:
  config: avoid string argument to __attribute((deprecated))
Merge branch 'jed/fix-matop-enum' into maint

* jed/fix-matop-enum:
  Mat: add MATOP_ values for missing functions
Merge branch 'jed/fix-pcgamg-nearnullspace-corruption' into maint

* jed/fix-pcgamg-nearnullspace-corruption:
  PCGAMG: fix corruption for multiple solves when MatSetNearNullSpace is used
  PCGAMG: remove distracting comment