Substantial rework for avoiding heap allocation and improving speed

Mostly involving adding u32 R -- for event window radius -- as a template parameter all over the place.  Also rehacks in bitfield and manhattandir.