Abstract generation of date_qpart in catchup_feed() function.

Noticed the "To Do" comment in catchup_feed(); so here it is.

Added generate_date_query_part() function to build the date query part for the catchup_feed() function in a more abstract way. Provides more flexibility for batch marking articles are read.

The generating function is also a bit future-proof in that it accepts more than just day and week intervals; it accepts ranges from seconds to years, as well as unix timestamps. This should provide more utility down the road or for plugin developers.