Hotfix checking in DatePair

Note that setStartDate and setEndDate should NEVER be called manually in code. These two methods are for XML loading ONLY.
Fix a logic bug in DatePair.isWithinPeriod()
Temporary fix for Task.toString()
Fix a possible bug in Task.isWithinPeriod which may be triggered when there are several null values in dateList
Refactor a little bit in LogicTest
Merge branch 'quality_control'