Thread-saf(er) + history in sync

Thread safety:
==============

* Improved thread safety, particularly single-threaded VM's but even
  between a main process that is also a lua-VM (xb-console test app)
* Affected domains:
  * GNU readline
  * LBM

History in sync:
================

When xb-lua single-session is being used by an application that also
uses GNU-readline, they will cross-contaminate each others history upon
attach/detach.

Keeping xb-lua's history it's own is achieved by history re-init/sync
(i.e. write/read to/from file) though all it's life-stages.

Applications needs to do the same, but mechanisms differ as they gave to
do it in event-handlers (see mycalc)