Refactoring for cleaner code + Fix for 30 day issue.
Refactoring for cleaner code + Fix for 30 day issue.

Refactoring for cleaner code + Fix for 30 day issue.
Specifically we had an issue determining how far we should keep looking
back in case a reddit request failed when we were processing a request
and we got the newest threads processed but older ones didnt.  Set it
up, now, to work off of the 'newest message for an already processed
thread being more than _ days old.'  Solves most of the issues I have
and gives us a downtime maximum value (configureable).  Fixed assorted
issues pointed out by another developer and added a new parameter for
the max number of root threads to look back.  Interesting parameter
that.

Pentom/modmail_ticketmanager,Civcraft/modmail_ticketmanager