Shipping helper/USPS/UPS dimensions and other fixes.

As promised, here are the modifications needed in order for the USPS and UPS modules to get a more accurate quote and avoid requesting this quote again and again:

a) Fixes "Since the UPS Settings array key “upsenvironmet” is only set when “Use Testing Environment" is selected, evaluating a non existent “upsenvironment” array key/value (for the UPS production environment link) provides the UPS testing environment link again".
b) Fixes "The UPS module calculations imply that all packages dimensions are integer, and since the product post metadata can take decimals, this may not always be the case."
c) Fixes "To avoid “spamming" UPS requesting the same quote a lot of times, the comparison done against the data stored in the “shipping_ash” array found in the wpsc customer meta doesn’t match because there are some array keys/values missing from it.", which is the same as the "Shipping quotes are retrieved on every page view" issue (#653).
d) Fixes "Checking if the shipment exceeds the 150lb UPS limit has a situation. The $weight variable is not initialized. The shipment weight is stored in $args[‘weight’].
e) Adds a rates_expire property into the ASHShipment class, so that these rates expire the same day they are calculated. A prospective customer might return tomorrow or after a month and check the cart again. Only then, the shipping rates will be refreshed once, unless the prospect modifies the cart contents or the destination.
f) Fixes "The ASH's class cache_results method its given more parameters than it can handle." 

Please see #714 for the source code related to these issues.

g) Fixes an issue in which the packages dimensions were not set by the shipping helper, so each shipping module was rounding each package dimension to 1 in. 
h) I added 1 filter hook and 2 class properties to aid the development of a shipment packaging optimization algorithm I'm currently working on.
i) Added a weight limit USPS check, if not using the advanced rates calculation. USPS has a 70lb per package shipping limit.
j) Fixed the \_clean\_response filter. This filter receives $response by reference, so it's only required to assign to it the double decoded value. "$this->\_clean\_response" instances don't have a variable where to return the modified value (see the "\_parse\_domestic\_response" filter).

I'm sorry, but I had to apply all of these modifications at the same time in order to get a complete shipping test.

If you require any information, please don’t hesitate to ask.

![pll20131216_5](https://f.cloud.github.com/assets/5473636/1795868/1121eca6-6a40-11e3-87a8-d4494b306258.jpg)