Engine status (updated by the engine author)

READY and tested against ref/ (tests/engine/t_perft.js, t_api.js, t_eval.js, t_search.js [nodes] [margin]):
  eng_init, eng_reset, eng_setup, eng_legal, eng_play, eng_check, eng_status, eng_think
eng_think is the real search (matches the JS reference node for node, incl. the levels 1-4 margin pass).

MEMORY (done at the UI fork's request):
  - ENG_SCRATCH_EXT: define it before including evars.inc. 0 = the engine reserves its own scratch;
    an address = the scratch lives there (e.g. slot A). ENG_SCRATCH_SIZE is defined with '=' (2,884 bytes now).
  - EVERY engine routine (eng_legal, eng_play, eng_status, eng_check, eng_setup, eng_think...)
    may overwrite the whole scratch: all temporaries, killers, the move stack and e_lm live there.
    Copy e_lm after eng_legal; reload slot A after any engine call.
  - Persistent engine variables (position, interface, game key history): 480 bytes.
  - Code + tables: 9,875 bytes (24-bit keys; Black's keys are White's rotated: Zobrist table 1,191 bytes).
  - Scratch: 2,908 bytes.
  - e_ttn may be 128 (1K TT). Any power of two >= 128.
  - think_poll is called with the engine's scratch live: it must not touch slot A.

Build notes:
  - put src/engine on the assembler include path (incdirs); define T0..T11 and TMW_FRAM.
  - set e_tt / e_ttn (and e_rnd non-zero, varying) before eng_init.
  - speed: ~95 nodes/s at 0.92 MHz in the emulator (still optimising; interface fixed).
