Fixes #542 and #543 Issues with <![CDATA[ tags

Problems in syndication.php and importing/exporting themes.
Fixes #542 #543 - issues with nesting CDATA tags

https://en.wikipedia.org/wiki/CDATA#Nesting is a better way to go about
this...
Fixes #658 Super Admins doesn't work as expected
close handle properly
Fixes #542 #543 - issues with nesting CDATA tags

Fixes this in more locations...
Fixes #542 #543 - issues with nesting CDATA tags

Remove filter on perpage as it is stored as an integer.
Fixes #752 Invalid fulltext search terms results in MySQL error
Preparing 1.6.14
Updated fetch_array

Made it be able to return associate, number, or both for type.
Update db_mysqli.php
Update fetch_array

Makes fetch_array get a second parameter to determine which format to return.
Updated fetch_array

Let it take a second parameter for the result type to return.
Renaming inner query to $update_thread_ratings_query.
Fixes #892 Incorrect setting on member.php
Fixes #870 Not any last poster (...)

Fixes #870 Not any last poster name in forumdisplay after splitting
a/some post(s)
fix: error message showthread.php?pid=x for deleted posts, refs #947

* showthread.php
  * added check if post with set pid exists before a thread with tid null is searched in the db
Apply changes from #927 directly
Modifies #971 Database fetch_array() Inconsistency
Fixes #936 Wrong compatibility check for plugins
Fixes #369 LIMIT clause in session updates