XEP-0198: Improve handling of incorrect stanza counts reported by client

There are corner cases where certain clients report a negative or a too large number of handled stanzas in the `h` attributes of the `<a/>` or `<resume/>` elements they send (yes, I'm looking at you, ChatSecure!).  Let ejabberd

* reject `<resume/>` elements with a negative `h` value, and
* adjust ejabberd's count to the client's `h` value if the latter is too large (i.e., larger than the number of stanzas sent by ejabberd).