Put everything in modules to stop global leakage
Give AppendDoms clearer name.

* Lowercase first letter - not a constructor
* More descriptive of what it does.
Avoid storing sample state on SampleDom

* Makes it clear it is not accessed from outside.
* Stops outsiders meddling with sample.
Remove unnecessary constants.
Add getNodeNode() interface to all dom objects.
Use getDomNode() interface instead of .domNode
Make appendToDomNode work with dom objects.

* Rename to appendToDom().
* Does not assume attribute name of domElement.
* Uses getDomNode() interface.
Use new appendToDom() fn.
Make domNode attributes on dom objects private.
Reassign whole GridDom prototype in one go.

* Purely to make code easier to read: groups all GridDom methods together.
* Just did this one as an example.  Mostly a matter of personal preference.
make GridDom just halder for dom node.

* No need to set width and height
* No need to call draw
* Get rid of weird code that knows where other dom elements are stored on models.
Calculate w and h of SampleTrackDom once.
Do drawing in SampleTrackDom constructor.
Remove unnecessary toString on SampleTrackDom w, h
Keep sampleTrack on SampleTrackDom private.
Bit pedantic to use getter to access private member
Move SampleDom draw() code to constructor.
Keep sampleTrack private to Sample constructor.
Keep fname private to Sample.
Pass fname explicitly to SampleDom.