rough prototype of item detection in each frame

This commit adds masks and a kartvid subcommand to identify item boxes in each
frame.  It also modifies the usual kartvid video processing to extract the
item information and print it out (e.g., with "kartvid video") when the default
text form is selected.

There's still a bunch of work to be done:

- It's still unclear how best to express item status to consumers of kartvid
  output.  The raw data of which item was detected in each frame is very
  inefficient for most consumers who probably only care about states like "slot
  machine started", "item selected", "item used", and so on.  It's also noisy,
  since there are blank frames, misdetected frames, and so on.  On the other
  hand, this information might actually be interesting sometimes, and it's also
  unclear how much of the higher-level decoding should wind up in "kartvid"
  since it's a non-trivial algorithm (and requires a fair bit of state) to
  figure out what's really going on with the item boxes.
- Detecting differences in item boxes should be optional for "kartvid video",
  since as it is now, it might confuse consumers, particularly JSON consumers
  like kartlytics.  The JSON form doesn't include the item information yet, so
  consumers will now see many more objects, many of which look like duplicates
  of previous objects.
- There are a few XXXs around code refactoring.
fix item box detection for players 3 and 4 (Makefile typo)
change "item" representation to enum
fix threshold to avoid detecting blanks as lightning
add option for having items be part of frame comparison
make "item box with unrecognized contents" a proper enum value
sort masks at startup so positions are always correct

These changes eliminate a lot of frames that really should have been marked
"unknown" because the item box was in transition.  It also fixes detection of
some others.  All of the frames I've spot-checked match valid item masks, and
nearly all of them are totally clear.

The sorting change could in principle have a significant effect on other,
non-item mask detection.  (It may actually fix several bugs.)
item box state detection now works properly for 2013-08-02_0000, modulo one
issue noted in TODO
fix kartvid text version; add json support for items to kartvid
update kartvid JS library to process item state
tools could better support building and running from different branches
kart.js should log to stderr by default
run_all should not generate webms by default
run_all always uses invalid output directory
add initial json_normalize tool
add item support to video-transcribe
flesh out json_normalize
js/kart.js still duplicating segments
json_normalize could use the same JSON indent as json does by default
kartvid output parser needs to ignore certain segments previously elided by kartvid
last fix was too aggressive
break out transcription from race parsing phases
kart.js still emits some invalid segments
fix processing of Yoshi Valley races
add prototype script for showing item information by rank
fix keithings with broken segments introduced with items changes
Merge branch 'items'