fix thrift configure.ac for detecting snappy

Summary:
The configure.ac used for opensource builds of fbthrift detects snappy by
linking against `_init`. Some compilers (notably gcc 4.8.3 and xcode 5's clang
3.4) do not generate a `_init` symbol. Testing by linking against `main`
instead.

Test Plan:
On a environment with dependencies installed:

autoreconf -i && ./configure

Reviewed By: davejwatson@fb.com

Subscribers: christianl, alandau

FB internal diff: D1548660
thrift server: access to worker thread vector

Summary: `getWorkers` previously created a copy of the `workers_` collection; now returns a const ref to it

Test Plan: getWorkers not used anywhere (?).  Nothing broke (compiles, nor tests) as a result.  Worked great in another project (separate diff).

Reviewed By: davejwatson@fb.com

Subscribers: alandau, bmatheny, maoy

FB internal diff: D1549224
Get hhvm compiling with clang-3.5

Summary:
This really wasn't that bad. A few mistaken uses of abs(), a few
functions unused except in debug mode, and some apparently-redundant
bool conversions.

@override-unit-failures

Test Plan: `fbconfig --clang --with-project-version=clang:dev` and tests

Reviewed By: meyering@fb.com

Subscribers: dcsommer, noamler, afrind, trunkagent, hphp-diffs@, ps, mathieubaudet, alandau, bmatheny, ptc, hphp-diffs@lists

FB internal diff: D1546566
Change request tracking to be per-ThriftServer instead of global

Summary:
Changing the request tracking behaviour to be per-ThriftServer
instead of global so that, for example, we can have a separate server
for maintenance and monitoring operations (like fbagent counter
collection) and not have those suffer when the server gets overwhelmed
on the main ThriftServer.

Test Plan:
Ran tests in thrift/lib/cpp2/test.  Let me know if there are
other tests that I should be running.

Reviewed By: davejwatson@fb.com

Subscribers: benj, rbhoj, sumeet, alandau, bmatheny, sanketh

FB internal diff: D1548381

Tasks: 5126677
Add support for persistent_headers in Java

Summary:
In Serf, we need some headers to be sent with every request to function properly.
e.g., we send your used id in a header to know who is doing what, and check for permissions.

We need these headers to be on *every* request sent by our clients, therefore we must use `setPersistentHeader` instead of `setHeader`.

Unfortunately, persistentHeaders are not implemented in Java. This diff implements it.

Gotcha:
* writerHeaders are now erased after each requests. replace `setHeaders` with `setPersistentHeaders` if that's not what you want

Test Plan:
I'm testing this with my diffs for THeader support in SerfUtil: D1510765 and D1509281

Specifically, I've added tests that use the same client twice.

Reviewed By: qinteng@fb.com, alandau@fb.com

Subscribers: gangli, ruibalp, alandau, bmatheny, sajalj

FB internal diff: D1546292

Tasks: 5125024
put relevant gflags behind an ifdef

Summary: hhvm doesn't need gflags.  These are the only ones in the core library, all the rest are in tests.

Test Plan:
fbcode - contbuild
hphp - followed https://our.intern.facebook.com/intern/dex/hhvm/hhvm-open-source-oss-dev-server-build/

Reviewed By: pt@fb.com, alandau@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1550799
Bump version to 3:0