Unified invoice and creditmemo item rendering

Fixes the problem that SKUs can overlap the product name on creditmemos. The functions are copied from the Invoice class.