Put in a check to get out of an infinite loop in davidson.

Renamed template argument (LocalT to BigMatrixT) in davidson
to make clear that this is the big matrix that davidson works on.

Added some error checks.