More improvements to the parsing of grades.

- Decimal format errors are now passed as ValueError exceptions
to applications.
- Checking that each grade is within the expected range, if defined.