Add locking functionality to PUT method

Also: 

Don't safe_json_decode nil body values from PUT

Use ngx.encode_args instead of table concat for request options

json_encode table or boolean values passed into PUT