sys: cannot do input validation when !PetscInitialized

PetscInitialized() and PetscFinalized() may be called before
PetscInitialize() or after PetscFinalize(), thus they cannot use
validation or stack macros.
sys comm: use union instead of void* and memcpy for MPI_Comm as an attribute

We pack an MPI_Comm into the attribute pointer so that there is no PETSc
memory allocation needed to hold the reference.  The degree of the
pointer can be confusing when using a loose void* pointer and memcpy, so
use a union instead.
sys: use union for Bcast of an MPI_Comm in PetscObjectName
sys comm: separate destructors for inner and outer comms

This simplifies control flow relative to the old version where the same
destructor was used for both inner and outer comm.  The outer comm
destructor still redundantly calls MPI_Attr_get, but demonstrates that
this call is unnecessary.  The redundancy will be removed in the sequel.
sys comm: remove redundant self-call to MPI_Attr_get in DelComm_Outer

MS-MPI (2008 and 2012) invalidates the communicator before calling the
attribute destructor.  This is considered a bug as evidenced by test
attrdeleteget added to MPICH in:

  commit c532aacc14f77a04ffca0c212731700a5d3d9a01
  Author: Jed Brown <jedbrown@mcs.anl.gov>
  Date:   Sat May 18 12:55:38 2013 -0500

      test: add attrdeleteget, MPI_Attr_get called from delete_fn

      With MS-MPI 64-bit from HPC Pack 2008 and 2012, MPI_Attr_get returns
      error code 773 when called from delete_fn on a communicator obtained
      from MPI_Comm_split.

      The standard is not explicit that the 'comm' argument of delete_fn must
      be valid, so this test is only in effect when !USE_STRICT_MPI.

      Signed-off-by: Jed Brown <jedbrown@mcs.anl.gov>
      Signed-off-by: Satish Balay <balay@mcs.anl.gov>

However, in PETSc, the attribute value is already passed as an argument,
so we need not call MPI_Attr_get to obtain it.

Note that although we still call MPI_Attr_delete and MPI_Attr_get on the
inner comm, that communicator has not been invalidated yet.
cmakegen: abstract Mistakes checker to be reusable via import
make: add GNU make and ninja build system

Currently only works for shared, single-library, and gcc-compatible
compilers.  The Fortran modules are a soup of circular dependencies,
which make warns loudly about.

  make -f gmakefile PETSC_ARCH=your-arch -j10

This requires GNU make version 3.81 or later.

For Ninja [1], the entire file is generated in the build directory, so run

  conf/gmakegen.py PETSC_ARCH=your-arch --output=ninja
  ninja -C $PETSC_ARCH

The Ninja build does not yet support C++.

[1] http://martine.github.io/ninja/
make: teach GNU make about with-single-library=0
make: add option RELINK=1 for use with-single-library=0

This option should be unnecessary as long as header dependencies imply
rebuilds correctly.
make: clear .SUFFIXES because we do not use implicit rules
make: teach gmakefile about F90 modules
Merge branch 'jed/gnumake' into next

Usage:

  make -f gmakefile -j20

No support for shared libraries yet.

* jed/gnumake:
  make: teach gmakefile about F90 modules
  make: clear .SUFFIXES because we do not use implicit rules
  make: add option RELINK=1 for use with-single-library=0
  make: teach GNU make about with-single-library=0
  make: add GNU make and ninja build system
  cmakegen: abstract Mistakes checker to be reusable via import
Merge branch 'jed/comm-attr-delete' into next

* jed/comm-attr-delete:
  sys comm: remove redundant self-call to MPI_Attr_get in DelComm_Outer
  sys comm: separate destructors for inner and outer comms
  sys: use union for Bcast of an MPI_Comm in PetscObjectName
  sys comm: use union instead of void* and memcpy for MPI_Comm as an attribute
  sys: cannot do input validation when !PetscInitialized