manual merge of 5.0 patch and fixing an issue with closing temp tables when no binlog or RBR.
Note, that despite temporary_tables is indeed double-linked list in 5.1 (patch for bug #19881) it is still enough to use only 'next' reference, as it was done for 5.0, when the list is sorted and
destoyed after.
mysql-test/r/rpl_temporary.result:
results changed
mysql-test/t/rpl_temporary.test:
fixing kill stmt for a thread with temp tables. Restoring check of temp table with accent char.
sql/sql_base.cc:
manual merge part 2. Leaving only extensively refactored close_temporary_tables from local rep.