[WIP] move common code of reports_controller and timelog_controller into a common helper

there is a lot of duplicated code between the timelog and reports controller. DRY that.