Rename timeinterval/interval to duration.

According to the standard's glossary, "duration" is a better name for
what we're using than "time interval", although the usage in the standard
itself is quite mixed.

@arjclark, please review.