Implement characteristic polynomial

Implement characteristic polynomial using `berkowitz`'s algorithm. Only the coefficients of the characteristic polynomial are returned, not the characteristic polynomial itself.
In the course of that also we should also add a DiagMatrix class/function.