Add a hook for post-ANF transformation

For use by custom implementations of the async macro.
Abstract over use of scala.util.Try

Custom implementation of the async macro may choose to use
a different data type to represent `Throwable | A`.
Clean-ups found during review of PR #43
Merge pull request #44 from phaller/topic/cleanup-43

Clean-ups found during review of PR #43
Update README.md

Fixes #45
Fix a NPE in the presentation compiler

We were using a TypingTransformer and we called
`atOwner` before we had called `transform`. This
meant that `currTree` was null, which was observed
when that was passed to `Context#make`.

IDE ticket:

    https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1001971#/activity/ticket:

Stack trace:

    exception during macro expansion: java.lang.NullPointerException
    at scala.tools.nsc.interactive.ContextTrees$class.addContext(ContextTrees.scala:78)
    at scala.tools.nsc.interactive.Global.addContext(Global.scala:28)
    at scala.tools.nsc.interactive.Global.registerContext(Global.scala:268)
    at scala.tools.nsc.typechecker.Contexts$Context.make(Contexts.scala:295)
    at scala.tools.nsc.typechecker.Contexts$Context.make0(Contexts.scala:320)
    at scala.tools.nsc.typechecker.Contexts$Context.make(Contexts.scala:327)
    at scala.tools.nsc.typechecker.Typers$Typer.atOwner(Typers.scala:5662)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:33)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:28)
    at scala.async.internal.AsyncTransform$class.fixup$1(AsyncTransform.scala:191)
Return original macro application under presentation compiler.

Right now, the body of an async block suffers from diminished
IDE support: most notably hyperlinking doesn't work [1].

During the course of the blackbox/whitebox macro discussion,
we've often talked about how the former give us the latitude
to simply disable macro expansion in the IDE so we could get
these features working again, at the cost of losing domain
specific errors, such as "await must not be used under a
nested function".

But why not have our cake and eat too?

This commit detects if we are running the presentation compiler
and, after running our regular macro, returns the original macro
application. We need to annotate that tree to prevent the typechecker
from stubbornly calling our macro again.

EXPERIMENTAL NOTE: This logic shouldn't live in macros: this is
just a short term measure. If these experiments in async prove
successful, we'll roll something similar into the macro expansion
engine itself.

TODO: as a performance optimization, we could just run the
"unsupported await" checks, and avoid doing the more expensive
state machine transformation.

[1] https://www.assembla.com/spaces/scala-ide/tickets/1001449-code-navigation-fails-when-macros-are-used#/activity/ticket:
Less hacky check for presentation compiler.

"There's a method for that!"
Merge pull request #46 from retronym/topic/pres-compiler-npe

Presentation compiler friendliness
Merge pull request #42 from retronym/topic/hooks

Hooks for custom async implementations
0.9.0-M3
0.9.0-SNAPSHOT