MDL-43759 logging: Add helper traits for stores and add support for buffering
MDL-43759 logging: Update stores to remove duplicated code