Improve the validation of FormData
Does two things:
- improves/strengthens the FormData validation on the calculator (sever side), particularly for times
- simplifies, and boosts the testing for, the interval selection algorithm. This algorithm is still overly complex - it can be simplified and made more predictable further, but additional tests will help us achieve that.