Added more overloaded functions of min/max in Option.

From: Jie Yu <yujie.jay@gmail.com>
Review: https://reviews.apache.org/r/16225
Added a WeakFuture<T>.

Using a WeakFuture<T> fixes memory leaks in Future::then and
Promise::associate.

From: Jie Yu <yujie.jay@gmail.com>
Review: https://reviews.apache.org/r/16197
Made all relative dates relative to poll time.

When Angular tries to resolve a filter, it runs it twice to see if the
value changes. Without passing a reference date to `relativeDate`, the
function instantiates a new `Date` to use as the reference. In the
surprisingly frequent case when rendering occurs on the edge of a minute,
dozens of `relativeDate` calls will return two different values if the
filter is resolved before- and after the minute edge.

For example:

    Render starts at 12:13:59.999
    $digest calls relativeDate, returns "1 minute ago"
    $digest calls relativeDate 1ms later, returns "2 minutes ago"
    Angular throws, "Error: 10 $digest() iterations reached. Aborting!"

By passing the pollTime to all relative dates, the dates are all
relative to the same moment in time, and $digest always resolves
properly.

Note: Because page rendering is unfortunately painfully slow on some
pages when there is lots of data, this case happens frequently.

Review: http://reviews.apache.org/r/16185
Fixed a bug in the task status accounting.

Review: https://reviews.apache.org/r/16188
Fixed the flaky AllocatorTest.RoleTest.
Fixed the zookeeper client wrappers to use the negotiated
session timeout value as their local reconnect timeout.

From: Jiang Yan Xu <yan@jxu.me>
Review: https://reviews.apache.org/r/16111
Moved millisecond multiplication to do only once.

The view multiples Task timestamps by 1000 to get milliseconds all over
the place. Do that multiplication only once to save multiplication in
the most frequent loops.

Review: http://reviews.apache.org/r/16250
Upgraded UI Bootstrap to 0.7.0, Angular to 1.2.3.

* Re-implemented the dialog service since it was removed in 0.6.0.

Angular UI 0.5.0 fixed a major performance problem with the collapse
directive[1] that was polling the scrollHeight of its element and
forcing unnecessary layouts.

[1] https://github.com/angular-ui/bootstrap/commit/a72c635c7669933204c17bf85cfe3d4fc350c73a

Review: http://reviews.apache.org/r/16264