[DOC] Fixed incorrect example in documentation for `multi_search`

Closes #511
[#525] Fixed bug where the `matches` Tire method interfered with a model method of the same name

In the current [implementation](https://github.com/karmi/tire/blob/v0.5.1/lib/tire/model/search.rb#L196-L202) of `matches`,
the `@attributes` variable of the model has been accessed directly.

This lead to an application crash when new model with a custom implementation of a `matches` method or a `has_many :matches`
declaration was saved:

    NoMethodError: undefined method `each' for nil:NilClass

This patch fixes the bug and preserves the original behaviour. Access the `matches` (percolator results) through the Tire proxy:

    @mymodel.tire.matches

Closes #525, fixes #501, fixes #280.
[#525] Fixed incorrect behaviour of `matches` in Tire::Model::Persistence

Rely on `matches` being brought in by Search, do not define the method directly.
Removed debug/warn messages unless ENV['DEBUG'] is set
[#505] Fixed JSON parser errors when logging empty bodies

When the Tire logger was set to `level: 'debug'`, Oj parser has been throwing errors:

    A JSON text must at least contain two octets!
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/json-1.7.5/lib/json/common.rb:155:in `initialize'
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/json-1.7.5/lib/json/common.rb:155:in `new'
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/json-1.7.5/lib/json/common.rb:155:in `parse'
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/multi_json-1.3.7/lib/multi_json/adapters/json_common.rb:7:in `load'
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/multi_json-1.3.7/lib/multi_json.rb:96:in `load'
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/tire-0.5.0/lib/tire/index.rb:324:in `logged'
    /Users/dboyd/.rvm/gems/ruby-1.9.3-p286/gems/tire-0.5.0/lib/tire/index.rb:21:in `exists?'

Closes #505.
[TEST] Set DEBUG level in the test helper

Some tests, such as Index#bulk, verify writing to the log.
[#505] Correct fix for JSON parse errors in Index#exists?

This fixes commit tire@ef14851, closes #505. Embarrassing enough.
Fixed, that Item#respond_to? conform to Ruby API

Ruby's native Object#respond_to? accepts a second boolean parameter
to determine if private methods should be included.

This commit closes #532.
Added test for Item#respond_to?

Fixes #532.
Allow arbitrary ordering of methods in the facet DSL block

Previously, calling `facet_filter` before other facet methods would fail.

Now, you can do this (notice the `facet_filter` comes first):

    facet "test" do
      facet_filter :range, published_on: { from: '2011-01-01', to: '2011-01-01' }
      histogram :myfield, interval: 70
    end

Closes #534.
[TEST] Sort result titles in `FilteredQueriesIntegrationTest`
[#540] Fixed incorrect index settings in `BulkIntegrationTest`

The "extract the routing value from documents" test in `BulkIntegrationTest`
was failing because the `bulk-test` index was created with only 1 shard,
so the filtering with the routing parameter couldn't work.

Fixes #537, closes #540.
Fix issues with Mongoid gem (incorrect JSON serialization of Moped::BSON::ObjectId)

To fix issues with the Mongoid gem, call `document.id.as_json` in the
`Tire::Index#get_id_from_document` method.

The culprit is the `yajl` JSON gem, when the compatibility mixin is required
(`require 'json/json_gem'`).

Closes #529.

Related: #535, #535.
[TEST] Added a test case for filtering results with multiple terms as `and`

See <http://www.elasticsearch.org/guide/reference/query-dsl/terms-filter.html>
Release 0.5.2
[DOC] Fixed the incorrect example of percolation while indexing document
[SETUP] Fixed the `rake web:update` Rake task
Added `Tire::Results::Collection#each_with_hit`

Previously, there was no convenient way to access the data returned by Elasticsearch
such as `_score` when the `:load` option was used.

This commit implements the `each_with_hit` method for results collection:

    results = Article.search 'One', :load => true

    results.each_with_hit do |result, hit|
      puts "#{result.title} (score: #{hit['_score']})"
    end

    => One (score: 0.300123)

The model instance is returned in the `result` variable,
the raw Hash from Elasticsearch in the `hit` variable.

Closes #562, closes #406.
[#562] Cleaned up the unit test suite for `each_with_hit`
[#562] Cleaned up and added integration tests for `Results::Collection#each_with_hit`