implemented QR factorization

this is a first sketch, the algorithm is not yet initialized and relies
on knowledge of DMat internals. A next step would be to implement this
algorithm in a more generic manner.