CS1013: New Sokoban levels (from GruntHack)

This adds 2 new bottom level variants, 4 new middle level variants and 2
new top level variants to Sokoban.

Compared to UnNetHack, this fixes an UnNetHack bug where the bottom two
levels (erroneously named soko4-3 and soko4-4, fixed to soko3-17 and
soko3-18 respectively) weren't being included in the pool of Sokoban
bottom level variants.
CS1014: Burlinate quest leaders' HP (SporkHack)

Quest leaders now have 136-165 HP, about double of what it used to be.
CS1015: Killed quest leader unlocks quest stairs

You can now kill your quest leader to open the portal to the downstairs
(from SporkHack).

This means that when the quest leader is angered, the player is no
longer expelled from the quest branch so long as they don't #chat to the
leader.  Also, the quest portal is no longer sealed under any
circumstances, plugging one of the few ways to render the game
unwinnable.

Compared to UnNetHack, this fixes a bug where the angered quest leader
would still give random encouraging messages instead of the intended
angry behavior, by adding an extra check at rule 4 of
chat_with_leader().
CS1025: Mind flayers no longer cause amnesia

Mind flayers and master mind flayers no longer erase memory of objects
or levels; they still cause physical damage and drain intelligence.
Only Cthulhu can still cause these amnesia effects.
CS1027: Remove anti-matter vortex

Note that this is not a full revert of the changes that introduced or
were made to the anti-matter vortex; it only removes the monster itself.
Code that allows a disintegrating monster to have disintegrating
engulfing effects still exists, but now it's just unused.
CS1028: Remove digging restriction in maze levels

Before this, spells and wands of digging in maze levels would always
stop after digging a single wall block.  Now they dig as far as they
do on non-maze levels.
Mark shown hidden historic events in wizard mode

Historic events that would be hidden to normal players but are shown due
to being in wizard mode are given a hash mark on their line in the list of
historic events.
Record bag of holding explosions as historic event

The history line only appears if the player has formally identified bags
of holding, much like how history handles gaining or losing the Amulet
of Yendor.

This is similar to UnNetHack r1029, except livelog isn't implemented in
NitroHack.
Enable -Wformat-security for debug builds

This was done in preparation for UnNetHack r1030, which is meant to fix
warnings of this type, but since NitroHack added a lot of const
annotations, all of these warnings have already been fixed.
CS1032: Fix out-of-bounds access when expelled

... from an engulfing monster.

Compared to UnNetHack, this changeset had many more fixes to various
compilation warnings that don't exist in NitroHack or this branch.
Note when monster blocks wizmode force teleporting

This is meant to go with commit 720f1b46cd (allow wizard mode to force
teleports to succeed).
Fix travel moving player back and forth repeatedly

This fixes a bug where hundreds of turns are wasted by the travel system
moving the player back and forth when the player targets an unreachable
space and sight-blocking obstacles occur in certain formations
in-between.  See the comment in the code for full details.

The use of couldsee() in conjunction with the smarter travel pathing
when guessing an intermediate travel target point was the cause of the
bug.  Other solutions considered:

 * Why not scrap the use of couldsee() altogether and just use the
   player-reachable space closest to the target?  The problem is that
   this could cause the player to be led halfway around the level to get
   to a space that's one closer than one very near the player's starting
   position.

 * Why not factor in how far the player moves in the above method?  The
   position that the game leads the player becomes very unpredictable.

The solution used limits the intermediate target while guessing to
spaces in the couldsee() 'blob' occupied by the player, cutting off
isolated couldsee() spaces to prevent them from being chosen, which
would otherwise cause the smarter travel system to move one way in one
turn while the couldsee() heuristic would move it back the other way on
the other turn.

This bug also exists in vanilla NetHack, where it can loop until the
player is fainting from hunger (this branch has a feature that limits
the bug to when the player reaches hungry).  As such it also exists in
UnNetHack and upstream NitroHack.  The specific fix is adapted for the
autoexplore changes in this branch, but can be easily retro-fitted into
vanilla NetHack.
Fix unsaved cheapskate flag for shopkeepers

This is meant to go with commit 793ae9d932 (CS43 cheap shopkeepers
always give 3/4 sale quote).
Fix non-zero bribe with zero gold warning

This replaces the warning "zero payment in money2mon" with a check after
the bribe amount prompt stating, "You open your purse, but realize you
have no gold."

This bug also exists in upstream NitroHack.

This bug also exists in vanilla NetHack, if GOLDOBJ is defined.
Fix wrong level used in m_initweap()

Yet another set of uses of the global level pointer where it isn't
necessarily the right level to use.

This bug also exists in upstream NitroHack.
CS1033,1035,1038,1039,1068: Add Convict role

This change allows players to begin the game with the challenging new
convict role.  This commit includes UnNetHack's bug fixes to the convict
patch as well as the patch itself up to 0.7, though with my fixes it's
really more like 0.7v2.  Original patch: http://bilious.alt.org/?421

 * The convict:
   - May be human or orcish (see questions below).  They are pariahs of
     their race, meaning the usual allied racial monsters may still be
     hostile to them.
   - Starts with a cursed striped shirt, some rocks and a heavy iron
     ball chained to them.
   - Starts with sickness resistance (they can safely eat old corpses!),
     get poison resistance at XL 7 and searching at XL 20.
   - Casts spells with INT, can gain basic attack (not matter like in
     the readme!) and expert escape.  Special spell is Teleport Away.
   - Begins on the verge of hungry, but can last twice as long at hungry
     and below.
   - Can eat tripe rations without vomiting, and have an XL/8 chance to
     not vomit after eating a stale egg.
   - Causes (vault) guards and watchmen to immediately become hostile,
     regardless of the striped shirt.

 * Heavy iron ball:
   - Convicts use and train the flail skill when wielding a heavy iron
     ball; no other role can.  When the ball is wielded at basic flail
     skill, convicts can avoid tumbling down when descending stairs and
     ladders.
   - Heavy iron balls do NOT count as weapons for the purpose of
     weaponless conduct.
   - Convicts do NOT start with the flail skill at basic, but rather at
     unskilled (see questions below).

 * Striped shirt:
   - Any character (not just convicts) will be banned from a shop if
     they try to enter while wearing an uncovered striped shirt.  The
     shopkeeper remembers this even if they return later with it
     covered.
   - Shouldn't be randomly generated, assuming I read the object line
     correctly.

 * Rats:
   - Convicts start with a pet sewer rat named Nicodemus, unless the new
     ratname option is set to something else.
   - Sewer rats could grow into giant rats, but now giant rats can grow
     into enormous rats and finally into rodents of unusual size.
   - Convicts can #chat to rats or throw food to them to calm or tame
     them.  Convicts cannot tame domestic animals.
   - Keep in mind that NetHack does not allow swapping places with pets
     when punished, which convicts start out as.

 * New artifact: Luck Blade
   - Intelligent chaotic broadsword with +d5 to-hit and +d6 to damage
     versus all monsters.
   - Guaranteed first sacrifice gift for convicts.

 * New artifact: The Iron Ball of Liberation
   - Intelligent NEUTRAL (not chaotic, though it's made so for convicts)
     heavy iron ball.
   - Weighs 300 instead of 480, and is rustproof for convicts only.
   - Grants magic resistance, displacement, automatic searching and
     warning when carried.  The readme mentions stealth too, but I can't
     find it anywhere.
   - Grants intrinsic phasing when invoked which lasts for 51 to 150
     turns.  This can leave you stuck in stone, but a warning is shown
     15 turns before it wears off.
   - Touching or invoking the Iron Ball of Liberation causes any mundane
     heavy iron ball to unchain itself.  Invoking it also chains it to
     you, as will carrying it when being punished.

 * New monsters:
   - enormous rat (brown r)
   - rodent of unusual size (brown r)
   - miner (gray @), comes with pick-axe and brass lantern
   - prison guard (cyan @), strong, takes bribes
   - lava demon (red &), very strong, appears in convict quest goal
   - Robert the Lifer (white @), convict quest leader
   - Warden Arianna (purple @), convict quest nemesis, HD 20, speed 12,
     AC 0, MR 40, chaotic (-14), d25 weapon, d25 weapon, d6
     artifact-stealing claw, resists fire and poison
   - inmate (black @), convict quest guardians
   - (not a new monster) horned devil is now a red & (was a brown &)

Compared to UnNetHack:

 * Missing convict quest monster generation info added to special
   levels; they were commented out of the convict role entry.

 * Fixed intrinsic phasing not permitting diagonal movement through
   stone and diagonal gaps by altering bad_rock().

 * Fixed punishment sometimes not attaching the Iron Ball of Liberation
   if other heavy iron balls are in the inventory.

 * Fixed zero-turn soothing of rats with #chat, and use a single rnl()
   roll to simplify the code.

 * Moved special weight/rustproofing from touch_artifact() to oname(),
   where artifacts are created (or christened, really).

 * Allowed characters wearing a striped shirt to enter the Black Market.

 * Rewrapped some quest text to make it display better.

 * Alternate convict legacy text uses random creator name (%m) instead
   of Markduk.

 * Removed redundant newsym() after placebc() in newgame().

 * Being unpunished when touching or invoking the Iron Ball of
   Liberation gives the message, "You are liberated from your heavy iron
   ball!"

 * Message for failing to tame a domestic animal uses "seems" instead of
   "looks" to be blindness-neutral.

 * Fixed "Foo yells:" within verbalize() messages.

 * Removed hard-coding of starting convict alignment to chaotic, since
   only races that can be chaotic may play as convicts, and alignments
   other than chaotic cannot be chosen anyway (see questions below).

Questions/suggestions:

 * Why is the artilist.h entry of the Iron Ball of Liberation associated
   with PM_PRISONER and not PM_CONVICT?

 * The Phasing macro is identical to HPasses_walls, so why isn't the
   latter used instead?

 * /* Time begins after phasing ends */ - what does this mean exactly?

 * Should a case for pbanned be added to block_entry() so convicts can't
   enter a shop diagonally if the doorway is broken?

 * Prison guard bribery code is almost duplicated in three places; it
   could use refactoring.

 * Convict role entry contains MH_DWARF and MH_GNOME, but since neither
   can be chaotic, they can never be chosen by the player.  The
   hard-coding of chaotic alignment in the original patch suggests they
   were intended convict starting races, as does the patch readme, but
   UnNetHack doesn't permit vampire archaeologists either.  Is this
   intended, or is this race info used elsewhere (e.g. for making player
   monsters)?

 * The heavy iron ball convicts start with does NOT start them with
   basic skill in flails.  The case for wielding an iron ball with basic
   flail skill preventing tumbling down stairs implies this is
   intentional on the patch author's (Karl Garrison's) part.  However,
   UnNetHack requires 100 hits to advance a skill from unskilled to
   basic, versus NetHack's 20 hits.  Should starting convicts receive a
   few extra flail hits to compensate?
CS1058: Allow vampires as race for convicts
CS1036:Don't burn Book of the Dead falling in lava

From GruntHack commit a9267e4288.  Compared to GruntHack, UnNetHack only
shows the "glows a strange dark red" message if the player's life could
be saved.

Credit to Steve Melenchuk.

This bug also exists in vanilla NetHack.
CS1037: Add more hallucinated monsters
CS1040: Add new hallucinatory sounds (from NAO)