Metadata

@vladdd introduces a few important changes; chiefly "centered" around version numbering of metadata (which is a clever way to work around the problem of stale client clocks).

Specifically, he addressed issues #12, #17, #39, #47, #48, #57. (This is a big set of changes, and we should try to avoid addressing too many issues in one branch.)