Fixed an incorrect condition in Index#retrieve and added that `nil` is returned for 404 responses

This fixes #939.
[TEST] Fixed incorrect test for STI

`to_i` obviously doesn't provide enough granularity.
[TEST] Another try to battle percolator test failures with sleep
Added the "pry" gem to the Gemfile
[TEST] Fixed 0.90-based test for exposing the Elasticsearch response

The "ok" key has been removed.
Changed, that the `<<` operator is used in Logger, instead of `+=`

Dramatically improves the performance of the code where strings are concatenated, by changing the "+=" for "<<".

Sample profiling of line 50 on logger.rb with a 20,000 lines json response from Elasticsearch:

    Before the change
    99.74%  48.04 seconds String#each_line

    After the change
    74.91%  0.11 seconds String#each_line

Closes #959
Added more defensive way of checking the @attributes in Item#respond_to?

Closes #944
add support for function_score query
Merge remote-tracking branch 'superorigin/master' into tire-master-0.6.2

* superorigin/master:
  Added more defensive way of checking the @attributes in Item#respond_to?
  Changed, that the `<<` operator is used in Logger, instead of `+=`
  [TEST] Fixed 0.90-based test for exposing the Elasticsearch response
  Added the "pry" gem to the Gemfile
  [TEST] Another try to battle percolator test failures with sleep
  [TEST] Fixed incorrect test for STI
  Fixed an incorrect condition in Index#retrieve and added that `nil` is returned for 404 responses