base: Move the format_bytes() and related APIs into base

This allows these to be used by multiple components outside
of the shell. The format_delay() is not yet ported as various
internationalization issues need to be sorted out there.