Revised the handling of truncation in leveldb to address the issue exposed by log catch-up.
Added log storage test for testing truncation.
Updated the CHANGELOG for 0.18.0-rc2.
Fixed comparator in tasks endpoint.

Related to MESOS-979, the tasks.json endpoint would sporadically cause the
master process to SEGFAULT. The code failed during the subsequent sort
(after gathering running and completed tasks) deferencing garbage pointer
values. The issue turns out to be an issue with std::sort and strict weak-
ordering. Descending order (which was default) was implemented as !ascending()
which is not a strict greather-than equal. This patch expands the descending
implementation and reenables endpoint.

Review: https://reviews.apache.org/r/18138