Adds max number of chat messages to retain

Large/active servers generate a lot of chat.  Initial page loads and memory
consumption was getting pretty high.  This limits how many messages are
kept in memory which should speed things up and keep things stable.

Future work will allow larger retention and paged APIs to keep a longer history
with fewer performance impacts.