setup ecdh and dh params
without it ECDH* and DH* cipher suites  won't work
allow to set cipher list for tls connections
allow to set cipher lists for s2s (s2s_ciphers parameter)
set ecdh and dh params on tls connect too
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