This was legacy remote state client and backends can use this test function without an import cycle.
Use consul locks to implement state locking. The lock path is state path + "/.lock" which matches the consul cli default for locks. Lockinfo is stored at path + "/.lockinfo".
This allows migration of the remote state implementations to a richer experience including input asking.