Switch to using the type checking decode_json

To avoid the problem of user file modification
into json of a non-dictionary type we should use
the decode_json helper that checks the root elements
type to help protect against these types of misuse.

Change-Id: I85889eaeee90650bc9b33f7e9ef7424eab8750b2
Fix dummy lock missing pending_writers method

In order to make sure other methods are not missed
add a base abstract class that contains the methods
a reader/writer lock needs to implement and derive
from it for the two lock variations we currently have.

Change-Id: I482cd0c6852e56e94149410d3c71890c55f25ae1
Use six.text_type() instead of str() in sqlalchemy backend

Change-Id: Ie78d2890ce008f22c94e705dbb489838375d303d
Merge "Use six.text_type() instead of str() in sqlalchemy backend"
Merge "Switch to using the type checking decode_json"
Merge "Fix dummy lock missing pending_writers method"