Merge pull request #6 from jkozlowski/master

Add top-level documentation.
Added cabal sandbox files + TAGS to .gitignore
Added commit index to types and to Follower code
CSetCommitIndex generation for leader
Some cleanup of 'udp' example
Forgot to update commit index in node state
Updated 'udp' example to use CSetCommitIndex
Minor cleanup: some formatting and redundant constraint removed
Merge pull request #9 from qrilka/commit-index

Implement commit-index propagation
- Eq Command
- Follower.handleHeartbeatTimeout
- Follower.handleElectionTimeout (a little bit)

WIP

Start defining types for simulating a cluster.

Couple hours of wrestling with lens documentation to write a single line.
Nice :)

Starting testing the simulator.
* Added bringDown test.
* Started killNode test.

Add tests for killNode.

Refactor withValid for simple tests.

Added appendEvents tests.
Added distributeEvents missing tests.

* Added functions for applying events to a particular node and
distributing resulting commands among the other nodes.
* Changed the _nsLog type to MemLog.Log.
* There are a few missing bits and bobs,
  and the whole thing is not particularly pretty
  but it should do for now.

Added a function that will simulate a single node with an incoming event
and output resulting commands.

Add singleEvent function that runs a single step of
the simulation, by popping a single even from the queue
of a particular node and simulating the events.

Defined the actual test, for now just
running and printing the final state.

First simulation completed and running.

-  The simulation runs until such time that:
* Quorum of nodes is alive
* We have a single leader
* All remaining alive nodes are followers and
  they have the same term and have voted for
  the current leader.

- Refactored `simulation’ method that can be used to
  run a simulation.

Add *.tix to gitignore.

Significant cleanup and refactoring.
Need to check if the random event can be run, otherwise check another event.

Hopefully fix the build.
Need to check for not used imports and extensions next.

Trying to fix the build.