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
Fix typo in Move.query_get: fiscalyear is on period, not move

issue3669
Use active_ids in form_relate

Only active_mode, active_id and active_ids can be used on relate domain because
it is the only values which could be sur to be present.
Also it always try to use active_ids over active_id to give more possibilities
to the user.

issue2474
review3261002