Merge branch 'js-testing' into develop

* js-testing:
  Refactor mock methods
  Test queue message forwarding to clients
  Refactor spec helper methods using instance variables
  Adhere to new RSpec stubing syntax
  Refactor mock methods
  Add test for error event
  Move model creation on message reception to Collection
  Enhance invalid origin message with actual URL plus some polishment
  Unspecify invalid origin error message
  Remove duplicated Backbone events
  Extend reconnection tests
  Add basic security and connection closing
  Fix onMessage
  Fix context on callbacks
  Refactor testing mock to helpers
  Add first events working test
  Add URI tests
  Add basic unit tests

Conflicts:
	spec/spec_helper.rb
	spec/stream_spec.rb
Test Event Stream Format compliance
Test JSON encoding
Fix old instance variables