Fix of segfault and little 'map' improvements

Stream now directly calls 'map' callback when value is pushed. Before it first pushed value in queue and then called callback that pops it back.. Also here's fixed bug that leads to segfault (it was wrong cleaning of 'then' callback).