Added IndexController->getDateParam(...) to validate isodates

This will throw an Phprojekt_Exception_InvalidParameter if the parameter is
malformatted.
use _getDateParam to validate isodate parameters
simplify regexp a little
correctly check the return value of preg_match
Move the hairy sql code to the timecard model
remove extra whitespace