better locking in TableMetadata.java

Signed-off-by: gburgett <gordon.burgett@gmail.com>