Added configuration for IDeduplicateMessages

Updated gateway sample to use in-memory deduplication