number_to_currrency formats negative numbers incorrectly

Right now, if you call number_to_currency(-1.23), it will return
"$-1.23". This is not correct in most cases. It should be "-$1.23"
and it should allow for other negative formats like "($1.23)".

I made a ticket for this and submitted a patch with more information:

Any codereviews or feedback would be appreciated.