[COOK-3451] Use Hash#key to silence Hash#index deprecation warnings

http://tickets.opscode.com/browse/COOK-3451

Update torrent library to use Hash#key instead of Hash#index to avoid warnings of Hash#index being deprecated.