This fixes a pending TODO comment regarding inefficient tags to emojis
mapping, by requiring a full scan over emoji aliases to determine
matches.
Instead, now the JSON file is a map, with aliases as keys, and emojis as
values. The script to convert the file with Python was:
```python
import json
with open("./mailer_emoji.json", "r", encoding="utf-8") as f:
content = json.load(f)
emoji_map = {}
for emoji in content:
for alias in emoji["aliases"]:
if alias in emoji_map:
print("WARNING: Duplicate alias:", alias)
continue
emoji_map[alias] = str(emoji["emoji"])
sorted_emoji_map = {k: emoji_map[k] for k in sorted(emoji_map)}
with open("./mailer_emoji_map.json", "w", encoding="utf-8") as f:
json.dump(sorted_emoji_map, f, indent=4, ensure_ascii=False)
```
Use netip.Addr instead of storing addresses as strings. This requires
conversions at the database level and in tests, but is more memory
efficient otherwise, and facilitates the following.
Parse rate limit exemptions as netip.Prefix. This allows storing IP
ranges in the exemption list. Regular IP addresses (entered explicitly
or resolved from hostnames) are IPV4/32, denoting a range of one
address.