[FIX] Inifite loop on archive_cleanup

Fixes an infinite loop in cleaning up the archive table:

* Shares come in faster than defined in cleanup sleep timeout

Will use an upper limit ID which would match the delete query at the
initial state. Skips archiving if no ID is found (e.g. no rows match the
archive purge conditions).

This will fix #997 once merged.
[FIX] Added more verbose output on failing crons for log
[FIX] Wrong parameter count
Merge pull request #1020 from TheSerapher/issue-997

Issue 997