[FIX] Fixed incorrect `Results::Item#to_hash` serialization

Without this fix, `Item#to_hash` returned `Item` instances for nested Hashes.

This commit calls `to_hash` recursively in `Item#to_hash`
Fixed incorrect `to_curl` output in Tire::Index#register_percolator_query
[#190] [FIX] Tire::Search::Search#version should return `self` to allow chaining

Fixes karmi/tire@2bf558508e0cf8457c826e7251e80a501ed0340e by @gedwards
[ACTIVEMODEL] Allow to pass :version option in Tire::Model::Search::ClassMethods#search
[#352] [FIX] Fixes MyModel#persisted? for Tire::Model::Persistence integration

Fixes karmi/tire@cef81338e225150dea0181773760647f05cf83e0 by @erickt
[FIX] Fixes Ruby 1.8.7 incompatibility

* Fixes karmi/tire@6c3b852 by @karmi (incorrect trailing dot)
* Fixes karmi/tire@ce47d00 by @karmi (Hash order)
[CI] Added running functional tests against live elasticsearch at Travis CI [http://travis-ci.org/#!/karmi/tire]

Squashed from the `karmi/tire@travis` branch:

c2d7f0d ‣ Restructuring the Travis configuration
79f454d ‣ Added running integration tests against live elasticsearch on Travis
d1c4374 ‣ Allow build failures on 1.8.7 and REE
b4fa8a0 ‣ Changed, that integration tests are run only on Ruby 1.9, unit tests on all Rubies
[CI] Use "turn" when running under CI
Fix typo (s/operation/operating/) system

Closes #412
Added support for aggregating over multiple fields in the "terms" facet

See “Multi Fields”, <http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet.html>
[#300] Added the "Dis Max Query"

Usage:

Tire.search 'index' do
  query do
    dis_max do
      query { string 'foo' }
      query { terms :tags, ['baz'] }
    end
  end
end

See http://www.elasticsearch.org/guide/reference/query-dsl/dis-max-query.html

Closes #300.
[#300] Added an example for "Dis Max Query" based on elasticsearch documentation

NOTE: The dis_max query gives exactly the same result as a boolean query:

    boolean = Tire.search 'dis_max_test' do
      query do
        boolean do
          should { string "albino",   fields: ['title', 'text'] }
          should { string "elephant", fields: ['title', 'text'] }
        end
      end
    end

This seems to contradict <http://www.elasticsearch.org/guide/reference/query-dsl/dis-max-query.html>?

> We want the primary score to be the one associated with the highest boost,
> not the sum of the field scores (as Boolean Query would give).
> If the query is “albino elephant” this ensures that “albino” matching one field
> and “elephant” matching another gets a higher score than “albino” matching both fields.
[#300] Added DisMaxQuery#to_json

Closes #415.
[FIX] Fixed errors in the "terms" facet on Ruby 1.8

In Ruby 1.8.x:

    "hello".is_a?(Enumerable)
    # => true

    "hello".respond_to?(:each)
    # => true

Can be confusing, yeah. You should upgrade to 1.9 :)
Added the ability to transform documents when reindexing
[TEST] Added an integration test for verifying document is store as proper type
[#461] Fixed the incorrect instructions for Mongo integration

Fixes #438, closes #461
Release 0.4.3
Added the `Tire::Configuration.pretty` option for JSON output

* The option is set to `true` by default
* Pass a truthy value to set the option to "true" or false/nil or false/nil to set the option to "false"
Added prettified JSON output for logging requests and responses at the `debug` level

Instead of displaying the request payloads and elasticsearch response as one lump,
use the `pretty` option in the JSON decoder/encoder by default:

    # 2012-09-21 17:29:47:506 [DELETE] ("articles")
    #
    curl -X DELETE http://localhost:9200/articles

    # 2012-09-21 17:29:47:508 [200]
    #
    # {
    #   "ok": true,
    #   "acknowledged": true
    # }

    # 2012-09-21 17:29:47:555 [CREATE] ("articles")
    #
    curl -X POST http://localhost:9200/articles -d '{
      "mapping": {
        "title": {
          "type": "string",
          "analyzer": "snowball"
        }
      }
    }'

    # 2012-09-22 10:43:58:851 [_search] (["logger-articles"])
    #
    curl -X GET "http://localhost:9200/logger-articles/_search?pretty=true" -d '{
      "query": {
        "query_string": {
          "query": "One"
        }
      }
    }'

To disable the default, set `Tire::Configure.pretty(false)`.