Fix bug in millisecond-to-string logic

When generating a string representation of a millisecond duration, use
the rounded value to determine if the unit should be pluralized.

This commit also introduces unit tests for previously-untested string
parsing logic belonging to the same module.