Add 'value' and 'units' methods to Duration subclasses.

Review: https://reviews.apache.org/r/20922
Used Duration subclasses to allow Timer users to specify units.

Review: https://reviews.apache.org/r/20923
Added template parameter to Timer.

Review: https://reviews.apache.org/r/20925