Use Rack::Accept::MediaType for mime type check

although `Rack::Accept::Charset` works, `Rack::Accept::MediaType` seems to be the "correct way" of testing against mime types.
Allows to not match a mime type
Merge pull request #24 from fnordfish/patch-1

Use Rack::Accept::MediaType for mime type check
Derive the collection type from the first item in the collection

Deriving a nice rel for the inside of the collection continues to be a
sticking point. Ideally we don't need to inspect the objects being
serialized, instead the collection gets an :item_mapper from the
association, and can take the type from the item_mapper.

If the collection sits at the top level then things are different. In
that case you could be explicit about the item mapper when calling the
top level call to yaks, but otherwise we need to derive the type at
mapping time from the contents, and this only works when the collection
contains at least one object. So not ideal, but has worked so far.

This adds some extra complexity to the policy, but it brings back the
pre 0.4.3 behavior.
Yard fix, format_class returns a subclass of Yaks::Format, not an instance
Prepare version 0.4.4
Fix test after changing the collection rel logic
Add documentation to Format and FP

As we progress a bit further here we are with a couple of more classes and
modules documented.
Add benchmark script, bring back top-level :item_mapper support
Get some profiling information
Merge pull request #26 from bjoska/More_documentation

Add documentation to Format and FP
Take pry out of the dev dependencies
spike on runner/pipeline
Get the Runner to a working state

Yaks::Runner generalizes the concept of a pipeline of transformations,
so it's easier to provide before/after/around hooks for each steps.

Also contains a fix for passing in an item_mapper to Yaks#call.
Add another benchmark

This is just the first, the idea is to compare flat vs deep structures.
Prevent freezing the Rack env

Switch to flat freezing in Runner, because it otherwise would deep
freeze the whole rack env.
Register the serializer each format needs, so far they're all :json

This also contains a refactoring of how registering a format works, and
JsonApi has been renamed to JsonAPI.
YARD updates and fixes
Support for different output serializations

Instead of returning a raw hash/array from Yaks.serialize, include a
last processing step to serialize to string. This way Yaks can
distinguish between the "syntax tree" representation (for JSON: hashes
and arrays) and the final string form.

Still needed: tests, ability to override serializer, before/after/around hooks.
Implement the `serialize' step and generic hooks

The final step of a call to Yaks is transforming a syntax tree
representation (for JSON simply arrays and hashes) to a string. Before
Yaks did not care about this step, leaving it to the caller to call
JSON.dump or similar. To support non-JSON output formats with a uniform
interface this had to be pulled into Yaks. It is possible to skip the
serialize step to get the old behavior:

    Yaks.new do
      skip :serialize
    end

This is part of a generic hooks implementation, all steps, :map,
:format, :serialize, can now be hooked into with before,after,around, or
skip. Hooks are inserted into the processing pipeline, so the return
value of the hook is passed on to the next processing step.

    Yaks.new do
      around :serialize do |data|
        start = Time.now
        result = yield(data)
        puts "Serializing took #{Time.now-start}"
        result
      end

      before :map do |model|
        puts "Mapping an instance of #{model.class}"
        yield(model)
      end
    end