XEP-0198: Support "resend_on_timeout: if_offline"

If "resend_on_timeout" is set to "if_offline", resend unacknowledged
stanzas only if no other resource is online when the session times out.
In other words, allow for sending them to offline storage, but nowhere
else.
Merge pull request #300 from weiss/resend-if-offline

XEP-0198: Support "resend_on_timeout: if_offline"
Fix init script: use getent to allow ejabberd user from external authentication sources (LDAP)
Merge pull request #301 from Iperity/master

Fix init script