Show spell stats while memorizing (9333)

Also preparation for something else I want to do.
Pull mons_spell_range into a separate function
Pull range_string into a separate function
Display monster spell ranges
Fix tiles compilation

??oops
Make range strings a little sillier

E.g., orc wizards now show o----> for throw flame instead of
@---->.

Not actually sure this is an improvement.
Changelog through 0.16-a0-3177-ge5ac76f
item_slot makes new items swap to get their slots (Sandman25, Tedronai).

Unless the old item matches the regex as well, in which case it goes
on to the next letter.
Make all potions appear darkgrey for mummies.
Fix shop sorting.

Most of this shopping code should really be torn out and replaced
by a proper Menu class like the skill menu.
Update documentation.
Don't block Sublimation at 50 max MP (#9335)

We were temporarily setting MP to 50 to avoid the enough-MP checks
in spell_is_uncastable.  Instead add back just the spell's cost;
this could still be incorrect if Xom casts Sublimation for you when
you are at maxmp-2, or if an ability casts a spell but costs less
mana than the spell would.

Also remove a second version of the Sublimation check now that the one
in spell_is_uncastable works in this situation.

PF points out that we probably shouldn't be checking enough_mp in
spell_is_uncastable at all.
Improve a comment.

And add a missing letter to the next comment.
Release the pedants!
Don't prevent blurry vision under Ashenzari

Instead of making this one source of SInv also provide protection from blurry
vision due to its wording, reword the messages slightly.
Reword a Xom message
Be more pedantic.

./json.h:67:9: warning: anonymous types declared in an anonymous union
      are an extension [-Wnested-anon-types]
More pedantry.

warning: overflow in implicit constant conversion
Avoid a warning

cio.cc:340:76: warning: format ‘%p’ expects argument of type ‘void*’,
        but argument 2 has type ‘input_history*’ [-Wformat=]
Document vault tech (nicolae)

[skip ci]