returning empty dict if entities is none
fixed how we get the appid for acquiring locks
removed undefined var txnid
Merge pull request #396 from shatterednirvana/add-logging-to-datastore-server

Fixed how we get appid for acquire lock