moved mysqlnd's block allocator to a separate file and also now it's part of the connection, no MT problems.