Pin sphinx version to 1.2 in tests.

Sphinx 1.2.1 has a bug that breaks our build:
https://bitbucket.org/birkenfeld/sphinx/pull-request/212/fix-an-exception-introduced-by/diff
Merge pull request #976 from daftshady/master

removed unnecessary else statements
Return a Future from IOStream methods.

This makes it easier to use IOStreams directly from coroutines.

Closes #953.
This is a fix to check  the argument to RequestHandler.write()
is one of the accepted types: dict, bytes or unicode and raise a TypeError otherwise
Merge pull request #979 from mike4999/simple_fix

 Fix for RequestHandler.write   to check for NoneType in argument
Add support in AsyncTestCase for detecting undecorated generators.

Fix a test that was not being run because of this issue.
Raise an error if IOLoop.start() is called while it is already running.
Improve the stack traces given for timeouts with @gen_test.
Add a benchmark for coroutine processing.
tornado.concurrent.Future is now always thread-unsafe.

This improves performance and provides more consistent semantics
(independent of the presence or absence of the concurrent.futures
package).

The parts of Tornado that accept Futures will accept both Tornado's
thread-unsafe Futures and the thread-safe concurrent.futures.Future.
Pivot tornado.gen to use Futures natively.

This improves performance of applications using @coroutine and Futures,
at the expense of some performance degradation for the older YieldPoint
interfaces.
Consolidate implementations of gen.engine and gen.coroutine.

The shared implementation is nearly identical to the old gen.coroutine,
with a small tweak for the callback argument.
gen.Runner now communicates back to the decorator via a Future instead of a callback.

This allows for failures to be reported without relying on stack_context.
Detect stack context inconsistency in gen.Runner.

The existing checks in StackContext.__exit__ are run after the damage has
been done and may raise exceptions in the wrong place; gen.Runner
is a more reliable place to detect this problem.

Throwing the exception into the generator provides a better stack trace
for the problem and also simplifies some of the complexity of testing for
this feature.
gen: Defer creation of stack context until a YieldPoint is reached.

The runner alone can catch all necessary exceptions as long as Futures
are used; stack contexts are only needed for YieldPoints (especially
Callback/Wait; Task could be changed to use a local-only stack
context).

This is slightly backwards incompatible for code that assumes the existence
of a stack context without yielding anything.
Fold TracebackFuture into Future.

Since it is no longer possible for TracebackFuture to modify
concurrent.futures.Future instead, there is no need for separate
classes.  Removing the subclass speeds things up a bit by removing
a level of indirection.

Also microoptimized a few methods of Future.
Microoptimizations for coroutines
* Lazily initialize data structures for YieldPoints
* Get rid of Runner.exc_info
Bring Future support for IOStream read operations into IOStream itself.

This speeds things up in comparison to the _iostream_return_future
decorator by removing unnecessary abstraction and especially by allowing
Futures to bypass some of the hoops IOStream jumps through to ensure a
clean slate for its callbacks.
Remove _iostream_return_future from write and connect as well.
Add a fast path to stack_context when there are no active contexts.

This case is increasingly common now that coroutines are decoupled
from stack contexts.