(bug 49264, bug 48965) validate time format.

This provides validation of the provided date/time string
when constructing a TimeValue object.

It does not however validate the calendar model, since the
DataValue does not (and should not) know which models would be
valid. This needs to be done by a Validator based on the
proiperty's data type (not the data value type).

Note that this contributes to the solution of the mentioned bugs,
but is not a complete fix.

NOTE: this was originally submitted as I6990983, but was reverted
because we do not currently have graceful handling of the failures
caused when encountering invalid data in the database (like we have
on wikidata.org).

Before merging this, we need to at least have a clear plan to handle the
resulting failures gracefully when rendering, diffing, serializing,
importing, etc.

Change-Id: I72d6b6d890718c07006c306c254479ce0789067e