Change application options

We relied on specific flags and settings for application options. This
commit switches from that mechanism to generic functional options. As a
result options are passed right when the application is created. And
cannot be changed afterwards. We also dropped support for commit threshold
as it is not required in our new design.
Add heartbeat and election ticks to node
Cache proxies for peers in hive

We used to create one proxy for each raft message. We now keep the
proxies in the hive.
Add timeout to connpool

Connection pools used to rely on a dialer function to support timeout.
This commit changed the implementation to use net.Dialer directly so
that the user can fine tune connection deadlines and timeouts.
Add AppNonTransactional option
Cache proxies in hive and bees

This commit cache the proxies in bees and hive for sending raft
messages. This is essential for preventing multiple connections to a
dead peer.
Reimplement stat collectors

The new implementation is simpler and avoids storing a state at the
optimizer. All migration decisions are made based on incoming messages.
Add Timer

Timer is a generic detached handler that calls a function on
pre-specfied tick.
Add a local stat poller based on Timer
Add OptimizeThresh option

OptimizeThresh option represents the threshold used by the local
stat poller. Whenever the incoming message rate of a bee goes beyond
this threshold, the poller will notify the optimizer.
Add NewTimer to create detached timers
Fix nit in registry
Add String() to app
Improve the pingpong example

This commit changes the behavior of pinger and pongers:
1. it only pongs to pings that are repliable.
2. it pongs with the same sequence as pings.
3. it pings with seq + 1 of pongs.

This commit also improves log messages of this example.
Removes an unnecessary return
Do not add Nil followers
Improve log messages in registry
Fix race between server and raft node in bees
Add a log message when reloading bees
Resolve bugs in collectors

This commit resolves:
- runtime errors when calculating the incoming message rate.
- error in sending the migration command.