Gather database connection details from model if it has its own,  otherwise use ActiveRecord

Request for issue #597
The goal is to get back transparensy for using thinking-sphinx with application with several database sources that disappeared after 117fad9b425d6514e2810303cce25a139bc60d60