Fix bug causing thenFinally callback to not be called

If a task is resolved synchronously (before callbacks are added), the thenFinally callback never gets called. I fixed the problem by testing _state the same way completes and fails do.