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)
Add missing error check

Docker-DCO-1.1-Signed-off-by: Nathan LeClaire <nathan.leclaire@docker.com> (github: nathanleclaire)
Merge pull request #7160 from fcarriedo/7159-test-coverage

pkg/units: Increased test coverage
Merge pull request #7162 from nathanleclaire/tar-with-options-err-check

Add missing error check
Merge branch 'master' of github.com:dotcloud/docker into registry

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)