Serialize basic, immutable properties of the interactive definition

[#43328491]
Update required component interface, implement it in button component

[#43328491]
serialize() functions should always return a copy of state objects

[#43328491]

It's would be reasonable to stick to this pattern to avoid possible
problems and confusion in the future.
Implement slider serialization

[#43328491]
Implement checkbox serialization

[#43328491]
Implement serialization of the numeric output and pulldown

[#43328491]
Implement serialization of the radio component

[#43328491]
Fix array module in node.js environment

It was causing problems during MML->JSON conversion.
Do deep copy of the initial model state to make "reset" reliable
generalize ModelController, add Model.type

[#41923323]

There is now a general-purpose ModelController that contains
almost all of the code that was in the MD2D ModelController

  common/controllers/model-controller

The MD2D is now greatly simplified and given a more generic name:

  md2d/controllers/controller

Additionally the Model function returned by:

  Model = require('md2d/models/modeler')

now has a type property.

  Model.type => "md2d"
fix error that crept into benchmarks
delegate to createModelController method

[#41923323]

Also model-specific controllers now provide optional ScriptingAPI.
Implement serialization of the thermometer component

[#43328491]
Implement serialization of parameters, outputs and filtered outputs

[#43328491]
Implement serialization of the bar graph component

[#43328491]
simplify ModelView Public API

[#41923323]

Public API for ModelView container now includes just these functions:

  update()
  scale()
  setFocus()
  resize(w, h)
  repaint()
  reset(newModelUrl, newModel)
  model2px(val)
  model2pxInv(val)

I removed:

  processOptions()
  setupDrawables()
  updateMoleculeRadius()
  updateDrawablePosition()

List of replacements for removed functions:

  updateDrawablePosition => update
  setupDrawables         => repaint
  nm2p                   => model2px
  nm2pxInv               => model2pxInv
Downsample force sensor

We aren't able to pass multiple data points into the current dataset without also emitting multiple 'data' events. Thus we are forced to redraw the graph 5 times for a single sensor callback that contains 5 data points, or else to downsample the data.

Moreover downsampling is itself made a little awkward by the dataset class because we are forced to set x increments for the raw and the filtered data, even though we ought to be able to just grab x-values from the raw data stream.