Fix rpc and workers separation
rpc package:
The rpc package should use Superviser interface for accessing workers,
but the implementation was based on direct access to WorkerList.
Tests also used methods not included in Superviser interface.
This patch fixes that, making rpc package independent of workers package.
It uses Superviser interface and MockSuperviser type for tests.
The test coverage of the rpc package has been increased
from 75.9% to 96.3% leaving only errors from net package's functions
not covered.
workers package:
All internal functions from workers package have been changed
to lowercase, unexported methods.
All exported methods are part of interfaces now:
* Superviser (used by Dryad through RPC calls):
> Register
> SetFail
* Workers (used by external HTTP clients):
> SetState
> SetGroups
> Deregister
> ListWorkers
> GetWorkerInfo
* WorkersManager (used by higher internal layers (matcher, requests)):
> GetWorkerSSHAddr
> GetWorkerKey
> TakeBestMatchingWorker
> PrepareWorker
> SetChangeListener
Change-Id: Ied9763b276ca02d05a904f4df2a7757a1892a772
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>