Use atomic increment and decrement for thread-safe reference count.

Change-Id: I630298b1c37a6d23c1aa17aabc1c9b2dcb48608a
Set mutex for external ref cache content.

Change-Id: Id00c0e553e08740df8d9b7eef19407e1b0d3f022
Make this method private as it is used only internally.

Change-Id: I752c9a6bcd7f5b057cd517a9630a975009d6fb0d
Add mutex for external source document meta-data container.

These get updated from reference parser code (ScAddress, ScRange etc)
which may be run from multiple threads.

Change-Id: I5a1aaa4b51d9b9fb032458eb5e89f0652887184e
Guard cache access with mutex & a new method just to check for range name.

Change-Id: Id24b5ba72362f9d878b4878c1e807bed3e596b20