Add limits to the number of router rule registration (#1752)
Limitations are set to the following values:
* max conditions: 1024
* max depth: 10
(Please see the PR description to understand how they are counted)
TypeError on exceeding the limits.
---------
Co-authored-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Co-authored-by: Domenic Denicola <d@domenic.me>