Update .ruby-version to match Gemfile
Fix content length spec
Fix SQL for content length query
Content length should return number of bytes, not characters

This is to make it work with the Content-Length HTTP header, which
always return number of bytes
Fix specs for purge log service