update ddiag() and collapse_dims() helper functions

* collapse_dims more concise, makes good use of numpy.array.reshape()
* ddiag():
	+ robust to nx1 matrix (squeeze and then diagonalize)
	+ can eliminate off diagonal entries, replace with nan

This update to reflect progress in broader math_tools.py (not yet published)
	commit 850d3b3db9aee0dc46d09d3ad7df1f63b151eafc
	K/indecol/Python/Modules/math_tools.py

 Changes to be committed:
	modified:   allocation_construct.py