Update test to gtest

Summary: because gtest  > boost test.  Moving to folly next

Test Plan: fbmake runtests

Reviewed By: alandau@fb.com

Subscribers: doug, ps, alandau, bmatheny

FB internal diff: D1553307
Transform user exceptions

Summary:
D1550687 fixed compression for TApplicationExceptions. This
diff fixes it for user exceptions.

Test Plan:
Used a test server to return an exception on a method call.
Checked that client got a TApplicationExceptions('Error while zlib
inflate') without this diff, and got my user exception with this diff.

Reviewed By: davejwatson@fb.com

Subscribers: ruibalp, alandau, jobenber

FB internal diff: D1556447

Tasks: 5151642
Fix more 'unused var' warnings, opt mode

Summary:
These ones only show up in opt mode

Apparenly DCHECK isn't compiled out in opt, while assert is

Test Plan:
set up links to checked out local hhvm-third-party, and then link thrift/thrift to fbcode/thrift.  Basically make hphp build use fbcode thrift to test

cd fbcode/hphp; cmake .; make -j8

@override-unit-failures

Reviewed By: alandau@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1557012
Fix for scripts

Summary:
Compilation got further this time. Also, make the fbthrift
project build the `TAsyncSignalHandler` class since we need that.

Test Plan: on laptop

Reviewed By: davejwatson@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1558875
Wrap a transport as THeaderTransport only when it is not

Summary:
Two things:
1. THeaderProtocol wraps the transport passing to it as a THeaderTransport but this is unnecessary if it is already THeaderTransport.
2. In libfb/py/thrift_client/base.py the tier's thrift_transport is ignored if it is not framed. Fix it to repect this property when it is set to header.

Test Plan: prism's python client

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

Subscribers: vloh, ruibalp, alandau, bmatheny

FB internal diff: D1553342

Tasks: 5148803
merge https://github.com/facebook/fbthrift/pull/27

Summary: merge https://github.com/facebook/fbthrift/pull/27.

Test Plan: run deps.sh on ubuntu, still works

Reviewed By: alandau@fb.com

Subscribers: doug, alandau

FB internal diff: D1558836
merge https://github.com/facebook/fbthrift/pull/18

Summary: Merge https://github.com/facebook/fbthrift/pull/18

Test Plan:
fbconfig -r thrift/lib/cpp2
fbmake runtests

Reviewed By: alandau@fb.com

Subscribers: doug, ruibalp, alandau

FB internal diff: D1558825
Bump version to 6:0