Allow custom encoders

I needed similar functionality to https://github.com/evan/memcached/pull/101 so I took a stab after reading your comment on that PR.  It behaves just like the current memcached, but you can pass in an optional encoder to the initializer.

This is how a custom encoder looks in practice:

```
  class SnappyEncoder
    MARSHAL_BYTE          = 4
    SNAPPY_FLAG           = 1
    COMPRESSION_THRESHOLD = 118
    def self.encode(key, value, flags)
      value = Marshal.dump(value) unless value.is_a?(String)
      if value.bytesize > COMPRESSION_THRESHOLD
        value = Snappy.deflate(value)
        flags = flags | SNAPPY_FLAG
      else
        flags = flags & ~SNAPPY_FLAG
      end
      [value, flags]
    end
    def self.decode(key, value, flags)
      value = decompress(key, value, flags) if (flags & SNAPPY_FLAG) == SNAPPY_FLAG
      value = unmarshal(key, value, flags) if value.getbyte(0) == MARSHAL_BYTE
      value
    end
    def self.decompress(key, value, flags)
      Snappy.inflate(value)
    rescue Snappy::Error => ex
      value
    end
    def self.unmarshal(key, value, flags)
      Marshal.load(value)
    rescue TypeError, ArgumentError => ex
      value
    end
  end
```

And then I'll pass that in as an option to the memcached initializer.
```
options = some_other_options.merge(:encoder => SnappyEncoder)
$memcache = Memcached::Rails.new(servers, options)
```