fix idle calculation if not using LIBXSS

the inp_get_char was never returning ERR even without getting any input
so the idle timeout stuff was wasting CPU and wasn't working if LIBXSS
wasn't used.
Moved chat states out of xmpp module for message send chat
Merge branch 'master' into chat-sessions
Fixed chat state for non OTR
Added chat_session_on_window_open
Added chat_session_on_incoming_message
Moved chat_session_set_sent from message.c module
Use events for chat sessions
Refactored chat session creation
Removed static functions from chat_session
Renamed recipient->barejid in chat sessions
Removed active and composing static functions
Fixed cmd_execute_default (resource instead of barejid)
Merge remote-tracking branch 'incertia/connect-default'

Conflicts:
	CHANGELOG
Merge remote-tracking branch 'savar/master'