direction matching oversight in ellipsis code

rmmh caught a case I had overlooked.  eagle eyes

https://github.com/increpare/PuzzleScript/commit/dfddc09208690f946c69265507f159d71b2c55a0#commitcomment-5891819
use a Rule class to make compiler/engine less scary.

This is still efficient since JS JITs are smart enough to not actually
create a dictionary for every class, but use hidden classes instead.

Test running time is unchanged.
add a CellPattern class to replace the heterogeneous cellrow lists
performance uneffected, all tests pass.
remove isLate and emptyRhs from Rule
add toJSON methods to Rule and CellPattern for standalone builds