Refactor content encoding interceptor out into a separate class

Made the following changes:
1. Refactored out the content encoding interceptor into its own class
2. Replaced allowed encodings `List` with a `Set`