Paginated all tasks on the web UI home page.

Angular UI already included a Pagination directive that renders a
Bootstrap-styled pagination list. This configures that directive and
adds paginated task tables to the homepage.

* Pagination displays only if there are more items than can fit on a
  single page
* Default itemsPerPage is 50, which will mean 50 Active Tasks and 50
  Completed Tasks on the home page.
Review: http://reviews.apache.org/r/16331
Fixed a bug that can cause the Master to produce a growing number of
leader detection loops.

From: Jiang Yan Xu <yan@jxu.me>
Review: https://reviews.apache.org/r/16333