Store adjoint solutions in SolutionHistory

Patch from Vikram Garg to store the results of transient adjoint
solves
Add a flag to SolutionHistory

Allow code to specify whether store() overwrites previously seen data
MemorySolutionHistory updates

Respect overwriting flag when storing; avoid "running off the end of
stored data" when retrieving.  Based on a patch from Vikram Garg.