Temporarily remove rewrite support

The way rewrite currently works is incompatible with the monadic-style
IO which will be introduced in a later commit. This commit removes the
rewrite support temporarily, so it can be easily restored later (by
reverting this change and adapting the result where applicable).

Change-Id: If8c59d60779235bd1e3db1fc896c518fef1411cd
Rework into monadic style

This commit changes Baardskeerder all over the place, changing the
Log interface to allow for various IO mechanisms, so we can create an
Lwt-backed Log implementation.

More information on the rationale behind this can be found in some blog
post on the Incubaid Research blog (once published...).

This commit adds a monadic interface to Log ('a m/bind/return/run),
converts the Tree module to use this new interface, and updates test
cases to compile and pass.

One drawback: the 'Rewrite' module can't be converted as-is, and as
such rewrite support is no longer provided, for now.

Change-Id: I47fc8ab5ef23f01b87cd8cdea83a243f6c79f50f
Add Mlog_lwt

This module is a simple wrapper around Mlog, but acting as if it's
backed by Lwt. It simply passes all calls to the pure Mlog
implementation it encapsulates, and lifts the result into an Lwt.t
value.

This is a simple test to check whether the changes introduced in
d98a85cf can actually work in an Lwt-based application.

Change-Id: Ib9e1233f726707d011b251f5ebde9135d61a97eb
See: d98a85cf66d06be3bb9d1c280706de9b10438769
Add Store module

This module defines the STORE signature, and provides 2 implementations:
one using an in-memory string, another using a file and synchronous IO.

Change-Id: I942662d48d34a669666e2c5b25b1b0b65a86634d
Add several utility functions to the Monad functor

Change-Id: I1091cd9f6f328ecf3d05e55c6cc2db70ed54dbce
Functorize Flog0

According to the new way of working, serialization implementations
should be functors over a Store.STORE module to result in a LOG
implementation.

This commit alters the Flog0 module to provide such a functor, and
updates the places where the plain Flog0 module was used before into
Flog0 applied to the Store.Sync module.

Change-Id: I3c057629f4b6d452517e331a41c9adac985cf7d3
Revert "Temporarily remove rewrite support"

This reverts commit e41ffdceb7fc60eb404d2635e603059e581b1eb4.
Store: Use Buffer.t for in-memory store and implement write

Change-Id: Ib56e18d9d4f826fdcaa42de521380e3c74e197d3
Rewrite: Fixup rewrite implementation

This commit fixes the revert of the removal of the rewrite code in
2d21f23d82 to compile again, using the new monadic based API.

This requires the test suite to use Flog0 (against Store.Memory)
instead of Mlog since Rewrite now requires serialization functors and
storage modules to be separated.

For now, also using bsmgr, only Flog0 databases can be rewritten.

Change-Id: I2438daf37eac799ec1f543785d9ca44a02475ce4
See: 2d21f23d82020c8c37579da36ee314fa8f22a2de
See: e41ffdceb7fc60eb404d2635e603059e581b1eb4
Merge branch 'lwt'

* lwt:
  Rewrite: Fixup rewrite implementation
  Store: Use Buffer.t for in-memory store and implement write
  Revert "Temporarily remove rewrite support"
  Functorize Flog0
  Add several utility functions to the Monad functor
  Add Store module
  Add Mlog_lwt
  Rework into monadic style
  Temporarily remove rewrite support