To speed up prison lookups by name use hashtable instead of traversing entire list of prisons.
Use hashalloc(9) to allocate buckets. To reduce chances of collision, a trade off was made to have 4096 buckets, so performance on 10K jails doesn't degrade - this should be enough.
rewire prison_find_name to use hashtable lookups. Use full prison name (incl parents), so lookups of descendants could be possible too.
With this change jail_get and jail_set become O(bucket_entries + depth).