Make masters and backups use segment size from config.

This means masters can use smaller segment sizes during unit
tests and so the segment size can agree with smaller backup
segment sizes.
Remove segment_id field from ServerList.proto.
Kill user_data on ServerList.proto.

It was only being used for the backup storage performance so it
has been renamed to match its used.
Segment footers now appear aligned at the end of segments.

This allows backups to find the footers at a specific, constant
offset which voids additional IOs to find the footer.

This implementation inserts a padding entry to segments before
closing them in the log.  The padding is zero-filled but is not
included in the segment checksum.
BackupStorage supports fetching all the beginnings and ends of frames.

This allows a restarting backup to look through all its frames to find
out which replicas it has stored and whether they are open or closed.

This is one of the many mechanisms which will be needed for cold start.
Read replicas from disk when backups start.

Rather rudimentary support that doesn't address several issues.  Garbage
collection of stored replicas that aren't needed is not addressed.  It
also does not recover the length of the segments for segments which were
open during a crash.  This is used in recovery to determine which copy
of a segment should be considered the real log head (though that should
change shortly with the new setMinOpenSegmentId functionality).

This patch doesn't distinguish between replicas found open on storage
and replicas that were opened the usual way.  It would probably be best
to have a special distinction for replicas which were open when they
crashed, but are no longer open since the original backup they were on
crashed.

Some older code expects that any open segment resides in memory.  In
order to keep from breaking that code stored replicas which were found
open on storage are loaded into RAM.

Finally, this code doesn't augment backups to inject a checksum for open
backups when a backup is exiting or under duress (which will also
require us to augment checksum to cover the footer log entry type).
Fixes RAM-374; unit tests were leaving 0644 files around in tmp.

This fixes an accidental missing unlink which was the real problem,
but also temporarily changes the umask to 0 in unit tests which
write the file.
Log specifies to ReplicaManager if a segment is head or for cleaning.

ReplicaManager will eventually need to use this to detemine how to
react to replica failures for that segment.
Add monitor which notifies ReplicaManager of backup failures.

Internally, the BackupFailureMonitor uses a ServerTracker to listen
for changes to the master's main ServerList, sifts through those
changes, and calls into the ReplicaManager to take corrective
actions when one of those changes is a backup failure.  This
BackupFailureMonitor runs in a separate thread this allows it
to react to failures in a timely manner and provides a context
to ensure that all corrective actions have been completed.
Atomic segment replication protocol.

This adds a new flag to backup write rpcs which sets an open replica
into an atomic write mode where either the entire replica commits
on close or the replica is guaranteed not to be used.

This will be important in backup recovery since we don't want
re-replication of closed segments to be mistaken for open replicas
particularly since they may contain a log digest and could be
mistaken for the head of the log during master recovery.
Basic failure handling for backup recovery.
Fix handling of open rpc failures.

The old approach could have resulted in log trucation due to lost
open replicas.

This also updates rereplication to use the atomic replication
protocol on the backup to prevent partially rereplicated segments
from being used during recoveries.
Several fixes and tests for backup recovery.
Implement CoordinatorService::setMinOpenSegmentId.

Recovery still needs to be augmented to filter replicas out based
on the value still.
Fix BackupFailureMonitor bug that was causing racy failures in tests.

ServerTracker entries can only be accessed after a remove event,
not an add event.
Docs and unit test MinOpenSegmentId.

Fixes serious bugs found during testing, of course.
Minor nits and documentation cleanups.
ServerList now enqueues changes to all tracker before firing callbacks.

This helps with consistency between various trackers on the same host.
If one tracker's callback is fired then all trackers have changes
at least enqueued to them that will bring them up-to-date through
the change that caused the callback.
Basic testing on new backup recovery protocol changes.
Remove old rereplicateSegments RPC.

Backup recovery is kicked off through ServerList change
notifications.