config: remove deprecated 'apply' in favor of func(*args, **kwargs)

'apply' has been deprecated since Python-2.3.  Its use makes profiling
output more difficult to read because a node is created for 'apply'
itself.
config: do not redundantly log command with 'sh:'

runShellCommand logs the command with 'Executing:' before popen, so this
line of logging was entirely redundant.
config: checkLink: remove redundant output

This function only attempts linking after a successful compile, but
outputCompile has already written the body of the function to compile.
The command was written by executeShellCommand, so it need not be
repeated either.
config: consolidate reporting of compiler/linker/archiver errors

Produce a non-redundant uniform format with empty output streams trimmed.
config executeShellCommand: trim empty stdout and normalize newlines
config BlasLapack: remove f2cpkg variable that is no longer used

The variable f2cpkg was abandoned in cff388ba514159a332016bfe5d06889d9451786d,
so remove it from the file.
config BlasLapack: checkLapack should check for ALL routines

This lets us exit early on failure, which speeds up configure checking
for libraries that do not exist.
config BlasLapack: checkLib need only look for Lapack funtions if foundBlas
config libraries.check: consolidate function-specific parts

This is in preparation for recursive batch checking for functions.
config libraries.check: test multiple functions in single compile
config: add libraries.checkClassify to find missing functions, use in BlasLapack

Usually we find most of the functions that we need to look for, so be
optimistic and try to compile and link them all at once.  If that fails,
recursively bisect so that we usually perform less than one compile/link
per function that we need to check for.

Using this in BlasLapack cuts BlasLapack search time in half.
config BlasLapack: remove unused checkForRoutine
config BlasLapack: trivial loop clean-up
config BlasLapack: mangleBlas does not need special logic for f2c
config functions: add checkClassify

Optimistically check for many functions.  Currently not faster because
the default function lists have too many likely failures.
config: add examineOutput callbacks to optimize functions.checkBatch

Missing symbols are usually named in stderr when a compilation or link
fails.  That information can be used to select those functions that are
more likely responsible for the compilation failure.

On my machine, this speeds up config.functions from 11 seconds to 5 seconds.
config functions: change ENOSYS safeguard to proceed further

Use of #error causes compilation to bail early without identifying all
the problem functions.  This will still cause an error, but will make it
further likely identifying all problem functions in the error message,
thus allowing faster batch classification.
config MPI: use libraries.checkClassify to find missing functions
config: consolidate classification based on boolean set functional

Eliminates code duplication caused by having essentially same "advised"
bisection logic in functions.py and libraries.py.

The common functionality is stateless, thus resides in its own module.
config: remove unnecessary unused variable in test