Const-ify the ddoc code
Merge pull request #2718 from yebblies/ddocconst

[DDMD] Const-ify the ddoc code