Shorten line length to 80 characters

This commit contains no semantic changes. It simply shortens
  line length so that the code is slightly more readable without
  horizontal scrolling
move initial frame data to seperate variable
Consolidate the two pieces of state into a single atom

This helps readability of the code by knowing there is only one
  variable that contains the state and only one variable that
  can be mutated.

This means if you refactor the code into multiple files you
  only have to pass this one variable into the functions
  from the other file.
add in editor.set() from Matt+Fix
use frameListEditor correctly

There were two callsites using `frameList` instead of
  `frameListEditor`. This seems to be a bug. `frameList` is a
  function not an observable and it doesn't make sense to
  set the content of an observable
meant to use an observable for editor

`observ-hash` does not convert non observables to observables.
  Therefore the call to `editor.set()` would fail
capatilize imports

Using capital letters for these functions reduces the amount
  of confusion between similarly named instances and factory
  functions.
rename `frameListEditor` to `frameList`

It's confusing that there is `FrameEditor`, `FrameList` and
  `frameListEditor`. To reduce confusion i've renamed the
  `FrameList` instance to `frameList`
Use two values in the state for editor & frameList

This reduces confusion between what is currently rendering.
  This will avoid duck type checks in the view and allow the
  rendering wrapper to have a slightly different container
  for each type of widget.
sub components are apps, not views
declare frames variable. fixes bug.
Pass state into a single static editor component

We create a single editor component initialized with the null
  frame.

We then set the correct currentFrame and the editor will
  internally re-render.

To control what is visible we use an extra boolean instead.
  Not sure if there is a way to get rid of the boolean, it's
  a bit ugly. Maybe we can just read `editor.visible` and have
  the editor deal with this boolean.
add comments from Matt-Esch gist
BUGFIX: correctly use `input`
Use getter syntax to unbox observable

`state.frames` is an observ-hash or something alike

This means `state.frames[frameId]` returns an observable not
  a value.

If we set `currentFrame` to the observable then `currentFrame`
  is an observable containing an observable containing the value.

We need to unpack `state.frames[frameId]()` to ensure that
  `currentFrame` is only an observable of a value instead of a
  nested observable
Rewrite main.js to use a different approach to components

The component interface has the same garantuees albeit slightly
  different interface design.

A component returns state & events. Previously it returned an
  events object with a state property.

Now it returns { events, state }. It can be trivially refactored
  to once again return an events object with a state property.

More importantly we store the state that was already public in
  our `mercury.hash()` this means that any state changes to that
  component bubble up the global state atom and cause a global
  redraw.

Note that our usage of `partial()` reduces the cost of a global
  redraw. If we don't want a global redraw we can do a future
  optimization to remove said global redraws and instead use
  local subtree rendering approach. This is totally possible
  and has orthogonal trade offs that should be considered
  later.

We refactored the event listening code to use the new `.events`
  property but again this could be collapsed to be the main
  result of `FrameList()` with `state` being a property of it.

The other important change is that inside `render()`,
  the `state.editor` and `state.frameList` data structures are
  plain JSON serializable data structures. They do not contain
  `partial()` method. Instead we use the statically defined
  `Render` functions on the components and invoke them with
  their data structures.

This means the `partial()` method no longer is a method and
  it get's state from the first argument instead of `this`.

This entire refactor addresses all concerns except it uses
  the `Input, State, Render` pattern. A component returns a
  tuple of `{ Input, State }` and exposes a `Render`.

The `state` atom at the top has the normal immutability
  semantics you expect and the `render` is a function that
  uses nested function calls. This means that `render()`
  is a "simple" function that takes a JSON data structure
  and returns a plain vtree structure.

Also note that `Render` can return a simple `vtree` rather
  then return a `Widget` from `partial()`.

Also note that `FrameList` now has an interface where
  you can create one, and wire up `state` and `Render` to
  `mercury.app()` and it just works (tm). With the previous
  approach you would need a wrapper state atom and a wrapper
  render function to box & unbox the widget with a `partial()`
  call.
refactor frame-list to match new style
Merge pull request #24 from Raynos/frame-list

The frame list conversation