Use a lookup table of algorithm types for alg_is_* helpers.
This makes it easier to maintain these functions as algorithms are
added or removed.
Reviewed by: cem
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D24668