rate calculations per package not by order

- refactored the code to get measurements from the package object and not by the order.line_items which causes miscalculation when shipping from multiple stock_locations
- added some helper functions as well to cleanup some of the code
- added some verbose changes to make the code more readable

fixes #76