message/catalog: use more friendly RWMutex

This reduces contention and also significantly
reduces the cost if there are only readers.
The cost is still high using a RWMutex, but good
enough for now.

Change-Id: I0585d58179368896a0388b77dd4a06c9b12aed1f
Reviewed-on: https://go-review.googlesource.com/45101
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2 files changed