refactor and optimize dartdoc

R=alanknight@google.com

Review URL: https://chromiumcodereview.appspot.com//89423002