server: add unit tests

Make test coverage >= 90%

#1019 
@philips generally, the smallest possible interfaces, composed where absolutely necessary. This makes it much easier to test components, reason about dependencies, etc. (Similarly, things should be unexported by default and only exported when actually used.)

Dumb example with silly names:
```
type StoreInfo interface {
          Version() int
          Index() uint64
          TotalTransactions() uint64
          JsonStats() []byte
}

type StoreRead interface {
          Get(nodePath string, recursive, sorted bool) (*Event, error)
          Watch(prefix string, recursive, stream bool, sinceIndex uint64) (Watcher, error)
}

type StoreWrite interface {
          Set(nodePath string, dir bool, value string, expireTime time.Time) (*Event, error)
          Update(nodePath string, newValue string, expireTime time.Time) (*Event, error)
          Create(nodePath string, dir bool, value string, unique bool,
                  expireTime time.Time) (*Event, error)
          CompareAndSwap(nodePath string, prevValue string, prevIndex uint64,
                  value string, expireTime time.Time) (*Event, error)
          Delete(nodePath string, recursive, dir bool) (*Event, error)
          DeleteExpiredKeys(cutoff time.Time)
          CompareAndDelete(nodePath string, prevValue string, prevIndex uint64) (*Event, error)
}

type StoreBackup interface {  
          Save() ([]byte, error)
          Recovery(state []byte) error
}
```