Restored some of the locking semantics in ConnectToBootstrapEndpoint from previous code to see if it makes a difference to the segfaults (I see none here after 10x iteration of TESTrouting_api).