Added the ability to display the total progress.

- Switched to using flag package instead of custom flag handling.
- Added ability to display total progress in addition to rate. The unit of
  progress is the largest unit in the same base as the rate unit in which the
  total progress is at least 1 unit. For example, if the rate is in KiB, the
  progress will be displayed in B until the total gets to 1024 bytes, at which
  point it will be displayed in KiB until it gets to 1024^2 bytes, at which
  point it will be displayed in MiB.