Clean up spl-book.cc a bit.

Use a map, and change "int" params to use the proper enum type. Whether
the latter is really a good thing is arguable, since it does mean adding
more casts in more places, but I think it adds clarity to the calls.
Add support for arbitrary-size fixedbooks.

Which requires some massive code improvements, thankfully. Unfortunately,
making randbooks (including vault-defined ones) >8 spells long takes a lot
more work to do.
Improve distortion and rebranding interaction (#9278).