fix scheduled reports when there is no minute set

mid-sized refactor + tests included

http://manage.dimagi.com/default.asp?133813
this is fixing a potential second bug, which would occur if the celery task was slightly delayed. it's not a very elegant fix, but we should get exception notifications if it's a problem