Update formatPercentage to support more locale-specific formats

The formatPercentage function previously had support for only a limited number of formats (percent sign behind numeral) while our use case needed more formats to be supported. For example, some locales we support require the percent sign to be displayed in front of the numeral and some required various permutations of the percent sign and the negative sign for negative percentages. Updated the formatPercentage function to support these and added test cases.