Fix #4 js client connection timeout exception

If the server closes the connection without a reply, eg. because a
timeout was hit before the MessageBus.long_polling_interval or due to a
server restart, the success callback is called with null data.
The code no handles this gracefully instead of raising a TypeError
inside jQuery.each trying to call object.length on messages.
This case is not counted as an error, because we usually can reconnect
just fine instantly.
Merge pull request #5 from felixbuenemann/fix-js-client-timeout-error

Fix #4 js client connection timeout exception
minimal example
Use MessageBus::Instance.new as opposed to MessageBus
BUGFIX: subscribe could miss first message
FEATURE: support for /global/ channels (accross all sites)
Improved synchronization
MessageBus.last_message (new API)
Add license and homepage to gemspec.

I frequently lookup a gems homepage/repo_url RubyGems (e.g.
https://rubygems.org/gems/message_bus). These settings will be picked up
by rubygems.org upon publishing the next version.

I also added the license (MIT) to the gemspec.
Merge pull request #7 from rjackson/update_gemspec

Add license and homepage to gemspec.
insert middleware before ActionDispatch::Flash so that ActionDispatch::Session is usable from MessageBus
 fix javascript syntax in documentation
Merge pull request #8 from armhold/move_middleware

insert middleware before ActionDispatch::Flash so that ActionDispatch::S...