Parse takes a duration string in the form of 1y2d3h4m and if it is properly
formatted, the represented duration is returned. If it could not be parsed,
an error is returned. Spaces are ignored. It is okay for any of the types
of time to be omitted or in any particular order.