Misc SQL fixes for the invoice task.
CRM/Timetrack/Form/Invoice.php: fix for invoice edit: use the 'cost' from the line item, not the default cost.