Make Stream.resource/3 more like Stream.transform/2

With this change, we allow the accumulator to be passed
to after_fun once iteration is done.

This, however, introduces a deprecation on the old
format used by Stream.resource/3.
Use the new resource acc on GenEvent.stream/2
Deprecate Collectable.empty and Enum.traverse

The current implementation has three issues:

1. It is slow as we can't reuse the data structure but rather
   build a new one from scratch

2. Due to 1., trees can't be traversed

3. empty/1 is unable to deal with resources