Towards a generic setup.

Not finished yet, but the idea is to have a setup routine that takes
into account supine or upright (seated) posture.
Generalize M to q.

Cleaned up the code for converting rotation matrices to quaternions.
Added comments to make things clearer.
Change the default filename for the picture in DexCompiler.