tests: add tests for clearing resource
Add tests for write_resource() with parameter 'clear' set to True, which
should result into clearing the resource (overwriting PAXOS_DISK_MAGIC
with PAXOS_DISK_CLEAR). Also add tests for corner cases like calling
clear on empty storage or with empty lockspace and resource name.