fixed message counter to be windowState aware.
add tests for message counter functionality
Merge branch 'master' of https://github.com/witekdev/converse.js into witekdev-master

Conflicts:
	spec/MainSpec.js