OT::sched_gate bugfix & cleanup.

segfault (discussed in a previous commit and code) was that
sched_lstream was using unmasked weight_indices, whereas
sched_isfeature_get() was operating on masked bits.  consequently, it
could happen in tree_features() that a feature was considered "in use"
(and recursed into),  when in fact sched_lstream and sched_lstream_map
entries had not been created for it (since sched_newfeature hadden been
called on something which is equivalent AFTER masking but not before).
this was causing some memory errors that seemed to disappear when
commenting out the erase/insert calls on sched_lstream at the end of
learn (when features are actually build under sched_gate), but were due
to screwups elsewhere.  (valgrind didn't catch these.)

For some reason I thought I could sweep the masked/unmasked issue under
the rug?  paid the price.  Anyway, the code has lots of asserts to check
for various invariants now, it should be harder to have these sorts of
errors (similar asserts (now removed) caught the original bug).

DEBUG_AUDIT is now currently broken, as it uses unmasked id's, and is
comparing against sched_lstream (which uses masked id's now).  okay.