fix DOP reranking & posterior pruning; &c.

- DOP reranking now actually works for PLCFRS grammars; uses bitsets
  instead of (start, end) tuples.
- probabilties were stored before possible normalization, which broke
  posterior pruning.
- start symbol is now no longer guaranteed to have ID 1
- grammar.bylhs is now a stable sort;
  this, together with the previous point means that when a Grammar
  object is constructed with rules that are already sorted by LHS, the
  order remains the same; also, this ensures that
  grammar.bylhs[0][n].no == n.
- test shell script did not properly check for success / failure