Bug 833291 - Part 1/N: correct variable namings.

1. 'STORE_NAME' to 'MESSAGE_STORE_NAME',
2. 'lastKey' to 'lastMessageId'.
Bug 833291 - Part 2/N: add thread/participant stores.