added threaded server (for in-IDA stuff)
refactor threaded server support