Update validation for i-Tree codes and regions

* Add more errors
* Rewrite validation of i-Tree codes and regions
* Add helpers `all_itree_codes` and `has_itree_code`
* Add tests