[HBASE-10808] Forward porting Leases and Histogram bug fixes to trunk.

Author: manukranthk

Summary: This diff attempts to forward port the Leases and Histogram bug fixes back to trunk.

Test Plan: Run existing unit tests.

Reviewers: liyintang, daviddeng

Reviewed By: liyintang

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1226083

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1584170 13f79535-47bb-0310-9956-ffa450edef68
[master] Mark some testcases as unstable.

Author: daviddeng

Summary:
`TestFullLogReconstruction`
`TestSplitLogManager`
`TestHLog`

Test Plan: Run testcases

Reviewers: liyintang, manukranthk, fan

Reviewed By: fan

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1234220

Task ID: 3789093, 3297526, 3296253, 3862247, 3977473, 3376834

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1584171 13f79535-47bb-0310-9956-ffa450edef68
[master] Fix the problem of sunfire xml file

Author: daviddeng

Summary:
Some log was output by calling `Bytes.toString` instead of `Bytes.toStringBinary`, the former generates unpritable chars, which failed the Jenkins.

The diff change many (not all) usage of `toString` in `LOG` and `Exception` message composing.

Test Plan:
`TestHTable` and `TestFastFail` should pass after submitting.
Other testcase.

Reviewers: liyintang, manukranthk, fan

Reviewed By: manukranthk

CC: hbase-eng@, andrewcox

Differential Revision: https://phabricator.fb.com/D1236212

Task ID: 3789093

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1584172 13f79535-47bb-0310-9956-ffa450edef68
[master] Make ThriftResultSerializer use the correct library

Author: daviddeng

Summary:
Add `CuttingClassLoader` which allow cutting paths for loading clases
Add `ThriftResultSerializer` which loads

Test Plan: TestThriftResultSerializer

Reviewers: rshroff, manukranthk, liyintang, aaiyer, adela

Reviewed By: rshroff

CC: hbase-eng@, arice, chaoyc

Differential Revision: https://phabricator.fb.com/D1232884

Task ID: 3547474, 3948196

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1584173 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-10843] Update multiple versions and prepare for java 8

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1584178 13f79535-47bb-0310-9956-ffa450edef68
[master] First commit of Endpoint implementation.

Author: daviddeng

Summary:
An endpoint is a method running on the server. Some aggregation work can be done on the server and only final results are returned back to the client.

Current endpoints have the following restrictions, may be removed later:

An example of aggregation is shown in `TestEndpoint`

Test Plan: `TestEndpoint`

Reviewers: adela, manukranthk, aaiyer, fan, liyintang, gauravm

Reviewed By: adela

CC: hbase-eng@, andrewcox

Differential Revision: https://phabricator.fb.com/D1223428

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1584179 13f79535-47bb-0310-9956-ffa450edef68