server: add unit tests

Make test coverage >= 90%

#1019 
@jonboulle Other interface will be used later.
`Save` and `Recovery` is used by snapshot.
`Index` returns index of store and returns to user in header `X-Etcd-Index`.