Support rank-deficiency in calc_l_r_roots().
Regenerate tdvp_common.c after merge.
Simplify calc_x functions. Let cython optimize calc_x_3s.
Let herm_fac.. function handle all-zeros case.
Improve rank-deficiency handling in sqrt/inv funtions. Always throw away negatives. Also improve sanity checks and clean up.
Improve sanity check output for a few selected parts of generic.
Revert "Let herm_fac.. function handle all-zeros case."
Prepare to merge rank_def.

This reverts commit cf15b595ce45b49d8746a749a35946b8c223d0b2.
Update matmul.c (new 'diagonal()' method of matrix).
Merge branch 'rank_def', supporting rank-deficient matrices.
Fix tdvp_common.c after merge.