Make cached stateClasses be a ThreadLocal

In Erjang, we need to run multiple Kilim
"instances" concurrently, so we need this
static state to be thread-local.
Make line numbers work again
Make analysis.ClassWriter use the Detector API
Erjang specific methods inside Kilim

These are some special methods (mostly on Mailbox)
to provide the look-ahead semantics needed for
Erlang's selective receive.
Merge remote-tracking branch 'erjang/master'