Fix issue region not showing properly in shipping calculator.

* Wrong sort function was being used, caused array key value associations to be lost.

**Also...**
Removed unsues globals from function
Fixed some code formatting
Updated phpdoc

Closes issue #1088
Merge branch 'pr-issue-1088-shipping-calculator-country-region' into dev-master