Implemented events handlers

Two new methods
- bind
- unbind

event handler is activated through the received content from SockJS, eg:
{
  channel: 'channel-name',
  event: 'event-name',
  data: { ... content ... }
}

Performance fix to 'for' method, using length in variable.