Refactor session task state observing

1) Let's do all the logic in one place, when we setup the delegate. This
   removes having 4 different addObserver's and 4 different removeObserver's.

2) Using selectors for keypaths so we have compile time checking that a `state`
   method exists.
Merge pull request #1805 from kylef/state-observing

Refactor session task state observing