Merge branch 'release/v3.1.0' into develop
fix association scoping for real-time indices
handle has_many :through association scoping

using a pluralized multi attribute name causes the foreign-key check to
fail
Merge pull request #705 from thewebfellas/realtime_index_association_scope

Realtime index association scope
Making attributes method for SQL indices public.
All indices now respond to the attributes method.
Attribute/Foreign Key matching gets its own class.
Merge branch 'hotfix/docs' into develop
Markdown syntax in Textile file.
Fix wildcarding of unicode strings.

Closes #715.
Handle JDBC Mysql connection errors

jdbc-mysql raises a different error than mysql2 when it can't connect.
This causes jdbc-mysql connection errors not to be mapped to
TS::ConnectionError's.

Add a second regex to error map that maps errors with messages matching
'Communications link failure' to a TS::ConnectionError.
Merge pull request #716 from liveh2o/develop

Handle jdbc-mysql connection errors
Only expand log directory path if it exists.

It'd be nice to rely on the log directory always existing, but sadly this is not the case on Heroku (at least, not consistently). So, if it is there, the expanded path (avoiding linked directories) will be used, but otherwise, we don't really care.
Default Sphinx version is 2.1.4.

This is (as far as I know) only used by Thinking Sphinx. Let's do our best to keep people on modern versions of Sphinx as much as possible.
Log real-time index updates
Merge pull request #721 from epidemian/log-realtime-updates

Log real-time index updates
Real-time tasks for Cap v3 now refer to thinking_sphinx_roles.

They were using thinking_sphinx_options, which is not defined. Closes #724.
Note JRuby requires v1.7.9 or newer.
Fix :populate option for single-model searches.
Removing custom apt packages, using supplied Travis Sphinx versions.