Write a unit test for mjdgges (m implementation)

Based on matrices E and D from the example contributed by @JohannesPfeifer in #1154 (closed).