Since base_events.BaseEventLoop.run_in_executor returns a Future object,
a caller can call it with yield from/await. However, the result of the call is
not a coroutine since asyncio.iscoroutine(loop.run_in_executor(...)) returns
False.
It matters when one wants to use run_in_executor() in a task, such as:
loop.create_task(loop.run_in_executor(...))
In this case, an exception is raised immediatly, while the task is effectively
running in the executor.
This patch propose to make loop.run_in_executor() be an actual coroutine
function (and be tested).
I believe that returning a Future and document the function as a coroutine used
to be done quite often, maybe this should be fixed elsewhere too.
An alternative solution would be to change the documentation, explain why it
can not be used with loop.create_task() and should be used with
loop.ensure_future() instead.