chore(dgeni): Upgrade documentation generator to dgeni 0.4.0 

Upgrade to dgeni 0.4.0. Cleanup the generator code a little bit.