Improve nested benchmark API

API is 100% compatible with original one, and extend it with 3 new methods:

- `Benchmark#[]` returns nested timing report
- `Benchmark#[]=` privides a clean API to set timing value
- `Benchmark#measure` benchmarks given block

USAGE:

  class ArticleElesticUpdater
    def perform(operation, id)
      send(operation, id)
    end

    def update(id)
      benchmark do |bm|
        article = bm.measure(:find_article) { Article.find id }
        bm.measure(:update_index) { article.update_elastic_index }
      end
    end

    def delete(id)
      benchmark do |bm|
        bm.measure(:delete_index) { Article.delete_elastic_index id }
      end
    end
  end
Add sugar API to benchmark method

This patch provides a nice way to benchmark parts of worker in an elegant way:

  class MyWorker
    def perform(id)
      benchmark do |bm|
        obj = bm.call(:find_object, id)
        bm.call(:update, obj)
      end
    end

    def find_object(id)
      # ...
    end

    def update(obj)
      # ...
    end
  end
Merge pull request #8 from vid-io/enhanced-api

Improve nested benchmark API