pkg/units: Increased test coverage. Closes #7159.

Increased coverage:

  * Added test cases to size_test.go
  * Added coverage for duration.go

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Merge pull request #7160 from fcarriedo/7159-test-coverage

pkg/units: Increased test coverage