SQL Query performance optimization

General query speed issues fixed.

Fix for 'Mark all read' issue http://tracker.modx.com/issues/9393
Add indexes with resolver
More speed imporvements and fixes

Improving MySQL fulltext search speed
Fixes bugs that last commits had with post counts.
More adjustments

Fixes issue Feature #5211 http://tracker.modx.com/issues/9362
Fixes issues Bug #9525 http://tracker.modx.com/issues/9525

1. Normalizes participants for thread and impoves index usage for
participants list.
2. Now "Mark all Read" works per section: All unread, since last login
and replies to posts
3. Replies count is not bound to user login time anymore. ^--- #9525

To use new disThreadParticipant when not using package to upgrade, run
new lines from resolve.db.changes.
Fixes errors when doing simple search

Caused by me
Sphinx search for Discuss

Additional fixes to base search class.

Moved platform specific date range filters to their own files instead of
just using Solr syntax which is incompatible with sql and sphinx.
[#9366] Fixes unread PM counter
Minor fixes to tpl

And fixes few own mistakes on the go
Read all enhancement

Enhances 'Mark all read' when reading viewing posts since last
login/refresh. Old method erased also posts that are not in the list due
to user page refresh.
Read all fix

Mark all read also marked PM's read
Merge pull request #7 from the-dunnock/sql-optimization

# Fixes SQL performance issues
# Sphinx search added to possible search engines
# Loads of other tune ups
remove unneccessary solr indexing script
solr: updates to search driver
search: make boards condition less mysql-specific
small refactor of disPost->index

* adds question/answer flags to indexing
* allows options to be passed
make a couple of fix scripts more portable
solr: modify indexing script to run via web
schema: update disPost.message to mediumtext
schema: update disUser map to add missing index
Bumpdiebump