Fix for ticketed events attempting to sync line items when donation fails

Issue:
When a ticketed event donation fails the line items are synced and counting against the total tickets. Also, tickets are not sorting properly in the webform ticket selection table.

Recreate:
Purchase a ticket and force a transaction failure. Check the counts on the products and nodes, they would have been incremented.

Fix:
* Add function to calculate total tickets sold only using completed orders
* Calculate ticket totals on donation success
* Only sync tickets line items when the order is complete
* Sort tickets with the same weight function the admin form uses.