fixed emit event bug, split search and stream into two functions

* i fixed the event emit bug by emitting the event in the startStream function instead of the write function
the write function still gets the tweet data to analyze it but returns it with a callback to the startStream function which handles the emit event itself
* replaced a bunch of console logs by an emitting an error event instead
* i have splitt the search and stream calls into two distinct functions