This is a follow-up PR to PR18628 (D8929). In addition to the hash-functions limit test introduced with commit fa4c29b, it adds checks for the following size limits as defined in BIP37:
ad message type filterload:
The filter itself is simply a bit field of arbitrary byte-aligned size. The maximum size is 36,000 bytes.
ad message type filteradd:
The data field must be smaller than or equal to 520 bytes in size (the maximum size of any potentially matched object).
Also introduces new constants for the limits (or reuses the max script size constant in case for the filteradd limit).