Fix crasher in roundtrip-test.js and related bugs.

* walkDOM in roundtrip-test.js wasn't testing for undefined
  attribs in all cases.  This crashed the test on this page:
  'Wikipedia:Articles for deletion/Log/2007 November 21'

* Now fixed and lets roundtrip-test complete on this page.

* Additionally, some tests were incorrectly testing if (dsr[0])
  when it should have been if (dsr[0] !== null) since dsr[0] can
  be zero which is a valid value.

Change-Id: Ie9badd1ac98aec8895e06e95d9b1b79f491d4c74