Rewrite currency formatting function

The function now simply accepts a number and type.  To detect the
currency type based on it's symbol, I created the
currency_symbol_to_type function.

This simplifies a significant amount of code, and should allow us to
enter in new currency types more easily going forward.