Add full replica semantics

This patch changes the mock structure so that there are actual concepts
of replica and master; this also adds a new mock protocol to inspect the
replica and master statuses of specific keys; this protocol can function
over line-based JSON on the harakiri port, or by using the
:rest_port/mock prefix via http

Change-Id: Ia34c6ba186f896cfbff5b54a5f1a609b4db8a91c
Add --replicas option

Change-Id: Ibbc486b04817fe6cf30504b5100398a28560ccb1
Return NOT_STORED for append/prepend if key does not exist

Change-Id: Ibacc6ab0038e532433fb8a643491c80cc2b70ee4
Convert expiration time in constructor

Previously this was only done in Item.setExptime

Change-Id: Ia60178fddc16e0824cfa07bd208aca9e61933888
Allow better selection for replicas

Change-Id: I4fe0f5fe27edd224ac5757242f70bf602c4a2b17
Add some more stats

Some code uses this

Change-Id: I0910dab278804f12bd8cdc50429a2a9d5189c1ef
Removed some printfs and unused code

Change-Id: I9e4f29360eaf6bda8502352a981f41bfa36eddef
Add simple python script to manipulate keys

Change-Id: I4eccc46dadeb9a3e5b9dfe3d5c8e6f03955a2ab3
Make keyinfo output more details about each node

Change-Id: Ic702874f78c358771def68754dfa1e841845eaa0
Don't check ownership if server is null

Change-Id: Ia3e7cbff2d28afc992f2ee74aecd09447dc5691e
Use a numeric string value by default

Clients which assume a flag of 0 to mean JSON can better handle this.
This includes Python and Ruby

Change-Id: Ibb07fe5af8080eedec5206c3ebf5b6cc4ea57253
[mockctl] Allow to specify bucket

Change-Id: I7c1bfce17bfe1455089b72de88b7e8e4921b36d6
Change to proper copyright holder

Change-Id: Ib5b4f65cc9e68a514453ce707cd93d80a474cea0