Initialize event queues before termcapinit() call

- Move queue initialization out of event_init() into
  new event_early_init(), and initialise before termcapinit()
- Add event_early_init call to shell unittests