Omit XML namespace declaration for <iq/> stanzas

Only the child elements of <iq/> stanzas are qualified by the namespaces
in question, not the <iq/> stanzas themselves.

This change just clarifies the code.  It doesn't alter the behaviour, as
those <iq/> stanzas are handed over to jlib:iq_to_xml/1, and that
function ignores the 'xmlns' attribute anyway.
XEP-0198: Don't exit on socket send failure

If stream management is enabled, don't exit the c2s process when
ejabberd_socket:send/2 fails, but close the socket instead.  This gives
the client a chance to resume the session.

Thanks go to Matthias Rieber for reporting the issue, providing detailed
logs, and testing the fix.
XEP-0198: Cosmetic change: Omit redundant guard

The stream management state is never 'pending' when the c2s FSM is in
the 'session_established' state.
XEP-0198: Don't drop session on failed resume

The 'previd' value provided by the client during a session resume
request includes the client's JID and ejabberd's session ID.  If there
is a session for the requested JID but with a different session ID,
resumption should fail, but that session shouldn't be closed.  This
commit makes sure the latter won't happen.

In practice, this will only make a difference in odd corner cases.
install epam binary when available
don't stop make install if epam is not compiled
Don't forget to include 'Contact' header field in 2xx registrar responses
Fix odbc_port option processing
Merge pull request #218 from weiss/omit-iq-xmlns

Omit XML namespace declaration for <iq/> stanzas
Merge pull request #221 from weiss/omit-redundant-guard

XEP-0198: Cosmetic change: Omit redundant guard
Merge pull request #222 from weiss/keep-session-on-failed-resume

XEP-0198: Don't drop session on failed resume
Merge pull request #220 from weiss/handle-send-failure

XEP-0198: Don't exit on socket send failure
XEP-0198: Cosmetic change: Simplify state change

When the FSM goes into the 'wait_for_resume' state, let fsm_next_state/2
take care of updating #state.mgmt_state and of writing the log line.
This doesn't change the behavior, but simplifies the code.