Fix double documents

 * 4d50a66c0740711f15d38811d2fa16e2d9afa587 was hackily replacing the
   document that domino created for us. Here we use the dom APIs to
   cleanly remove it.

Adds a new mocha test case to prevent this bug from recurring.

Change-Id: I9430ce8ff18b21485a92c4502784457203b352d3