Turn on most -Wunused warnings for C++ code.

They used to be on, but some merge from release-4-6 ages ago removed
the flags.  Now, also -Wunused-parameter can be enabled.  At least new
code can now be kept free of these warnings; there is still ~150
warnings left for non(-thread)-MPI compiled C code.

Fix remaining warnings in C++ code.

Change-Id: I15628665ae9214c8d44b58bab5f963a3e1bc74bd