Fix update chart of accounts with changes on taxes or rule lines

- invoice_account, credit_note_account, invoice_base_code, invoice_tax_code,
  credit_note_base_code and credit_note_tax_code where not properly compared
  when upgrading the chart of accounts.
- Origin tax of rule_lines was updated with the value of the template, so
  it raised a domain validation error.

issue3617
review2961002
(transplanted from def3be51ee2b7625c15c46351250ecb77d8f8f4b)

--HG--
extra : transplant_source : %DE%F3%BEQ%EE%2Bv%25%C1%5CF5%12P%EC%B7%7D%8F%8FK