consolidated mysql

created a function that handles new connections and destroys them after
the callback is complete. Hopefully this will fix ENOBUFS errors when
doing a raffle.
fixed stream logging error

logging would continue after the stream was detected. This was due to
the realtime functon not checking if the stream was live or not.