akkadotnet/akka.net — pull request #451 by HCanber (2014-10-05 11:13:50+00:00)
Title: Fixes stashing #429

This fixes #429 Stashing for actors

- To add stashing to an actor, decorate it with the interface `WithUnboundedStash`. (`WithBoundedStash` is not yet implemented. If used it behaves like `WithUnboundedStash`)
- `ActorCell` creates a new stash if actor implements `IActorStash` (which the `WithUnboundedStash`/`WithBoundedStash` interfaces do) and hasn't set the `Stash`property itself
- `ActorCell`, after it has called `actor.AroundPostStop` and after `AroundPreRestart`, unstashes all messages. If the user wants another behavior the stash should be cleared in `PostStop`/`PreRestart` either by calling `Stash.ClearStash` or by calling `Stash.UnstashAll`.
- Marked `UntypedActorWithBoundedStash` & `UntypedActorWithUnboundedStash` as obsolete.
- __Breaking change__: The property `CurrentStash` in the interface `WithUnboundedStash` has been removed since `IActorStash.Stash` was introduced. Cannot find a way to make this non-breakable, but the impact should be low. Most likely, if anyone has used it, they've inherited `UntypedActorWithXXXStash` and it still contains `CurrentStash`

The first 5 commits only contains file moves or moving types into separate files. I've kept them as separate commits for easier reviewing.

The interesting commits to review are
- https://github.com/HCanber/akka.net/commit/18a1d7a48b0a3bd71abcac2eb2a56864b44d177a __Simplify AbstractStash. Add IStash.ClearStash(). Remove IStashSupport__
- https://github.com/HCanber/akka.net/commit/9d3041f0f5c3b68d868537488d3d9da9f408f908 __When unstashing, Terminated messages must be handled specially.__
- https://github.com/HCanber/akka.net/commit/6ecf5ce025c371620359fd0182f3c2a16b290075 __Let ActorCell create a Stash for IActorStash actors.__