A longtime lawyer for the Bill & Melinda Gates Foundation has split with the Seattle-based organization, whose co-chairs are currently in the midst of a highly publicized divorce, joining another nonprofit group as chief legal officer.