NEWTS-38: teach Duration to parse strings

Because this lives in API, I hand-crafted the parsing so as
to avoid adding a dependency on Joda.
NEWTS-38: parse string durations from REST config