Remove possible segfaults from res_odbc by adding locks around usage of odbc handle