Merge master into avstp
Make AvstpWrapper return correct number of threads