ODBC: Sync last item notifications with mod_pubsub

A while back, mod_pubsub was modified to address EJAB-1456.  However,
the change was only partially applied to mod_pubsub_odbc.  This commit
adds the remaining part.
Move routing of last PEP items into new function

This doesn't change the behavior, but avoids some code duplication.
Don't broadcast last published PEP items

When a client becomes available, don't send the last published PEP items
of all his peers to all his other peers, but only to that client.
Send last PEP items to remote subscribers

When a remote subscriber becomes available, send him the last published
PEP items (as we do for local subscribers).

However, the current implementation depends on a running ejabberd_c2s
process of the publisher to send items to remote subscribers.  So, for
those, the behavior is always like it is for local subscribers when
"ignore_pep_from_offline" is set to "true".