Apply SM patch set
Import mod_stream_management.erl
Add missing SM namespace
Use #xmlel{} instead of #xmlelement{} in SM code
Use binary datatype in SM code
Apply ejabberd_sm changes needed for SM
Generate binary SMID
fix resending of subscription requests
fix jid_to_string -> jid_to_binary
fix some error paths
* resume_session timeout - there were no session clean up and rerouting messages
* mod_ping - could cause premature c2s stop
* not all messages were send in "safe" maner (send_element without catch) error inside
send_element resulted in incomplete StateData during termination call. Morover after send_element
error we want to enter resume_session state.
more debug info
handle incoming stanzas in resume_session state
fix delay timestamps
add timestamp to buffered messages (stream management)
add microseconds to timestamp(prevents loosing order in some cases)
don't store delay tags in db

Conflicts:
	apps/ejabberd/src/mod_offline.erl
refactoring
create sid if it is  undefined while enabling stream management
handle possible errors while sending stanzas right after stream resumption,
without it session can be not closed
deffer checking unacked buffer size constraint
some messages are sent at once like resending offline ones, thus c2s
message queue can be full of them and c2s have no chance process incoming
acks
allow to set resume timeout (used in sm_SUITE)
add mod_stream_management to config file
move catch send_element to function